Zhullyblog
81 FOLLOWERS
Zhullyblog is a blog about HTML, CSS, JavaScript , PHP , Python and any related coding tutorials
Zhullyblog
3y ago
INHERITANCE
INHERITANCE as said earlier in th introduction to OOP is a process in which a class acquires or inherits the properties and functionalities of another class.
SYNTAX
class Super {
//Properties
}
class Sub extends Super {
}
From the syntax, there is a line where we have : sub extends super. This means that the sub class inherits the super class.
Inheritance happens in our real world and there is no difference with programming.
Human being inherit some of parent properties/qualities so, it works like that in Java Inheritance.
Th ..read more
Zhullyblog
3y ago
CONSTRUCTORS
In this tutorial, you would learn about constructurs in Java programming.
A constructor in Java is a block of code that is similar to a method that's invoked when an instance of an object is created .
Note:A constructor is not the same as a method but it's quite similar to method. A constructor must have the same name with the class name and must not return any value.
Take a look at this;
class Sample {
void Sample() {
// method body
}
}
Sample( ) Is a constructor. It has exactly the same name as the ..read more
Zhullyblog
3y ago
Java Object Oriented Programming
OOP means Object Oriented Programming. This is a concept that basically deals with the use of object in programming. Unlike procedural programming that deals with the use of procedure and steps to execute a program, OOP makes use of Object in programming.
The concept of Java Object Oriented Programming entails the following:
• Polymorphism
• Inheritance
• Encapsulation
• Abstraction
• Class
• Method
• Object
Now, let's go into details.
POLYMORPHISM
Polymorphism is a Java Object Oriented Programming fe ..read more
Zhullyblog
3y ago
CONTINUE STATEMENT IN JAVA
The continue statement is used basically within a loop control to jump immediately to the end of statement or loop. It is used in both for loop and while and do...while loopetc.
GENERAL SYNTAX
The syntax is one of the simplest. It's just continue followed by semicolon.
continue;
Examples
Continue keyword in For loop
public class sample{
public static void main(String args[]){
for (int x=0; x<=10; x++)
{
if (x==8)
{
  ..read more
Zhullyblog
3y ago
BREAK STATEMENT IN JAVA
Logically, break means stop. This meaning also applied to programming.
Just as , a break statement is used in a loop to terminate or stop the loop from running when the condition we have stated have been met.
SYNTAX
break;
Explanation
I said earlier that a break statement is used to terminate a loop. So imagine if you want to print numbers from 1-30 but you want the numbers to stop when the number is 22. Then, what do you do?
The simple logic is use a break statement. The break statement terminates the loop ONCE the numbers are equal to 22 ..read more
Zhullyblog
3y ago
WHILE AND DO WHILE LOOP
In this tutorial, you would learn the use of while and do while loop in Java
WHILE LOOP
The java while loop is used to run a code repeatedly until a certain condition is met. This is used basically to test the code within the parenthesis and once the condition is met, it gives result.
SYNTAX
while ( condition ) {
//Code;
//Increment / decrement;
}
Explanation
• The parenthesis will contain the condition of the code
• Once the condition is met, the body of the loop will be executed.
Let's take an example in Java
//by Zh ..read more
Zhullyblog
3y ago
FOR LOOP IN JAVA
A loop is used to execute or iterate a statement repeatedly until a certain condition is met. In this tutorial, we would be talking basically about for loop but in context, there are 3 different types of loop which are for loop, while loop and do..while loop.
So let's dive into for loop people.
SYNTAX
for ( initialization ; condition; increment/decrement) {
//Statement;
}
From the syntax, there are 4 key terms that you need to understand. They are:
• Intialization : The first thing that need to be done when you wanna use a for loop is initializ ..read more
Zhullyblog
3y ago
If , If...else , nested if statement in Java
The If statement generally is used to test a condition. It is used to check whether a condition is true or false before executing a statement.
For example, you might want to check if x is equal to y , if yes then add x and y or otherwise.
There are other examples like -
You might want to allow user to only register their profile only if they are of certain age. And the example goes on and on.
The if statement isn't just about testing alone, I would say it is needed in every program. The truth is, you can't just let users enter anyt ..read more
Zhullyblog
3y ago
To do list app
Hello, welcome back to another series of web design tutorials. In this tutorial, we would be doing something different although might be boring to some but this project will help you understand JavaScript better. Jumpstart your frontend developer journey with web design series.
Prerequisites
In this tutorial, I assume that you have knowledge in HTML , CSS, JavaScript. If you don't have any,I urge you to familiarize yourself to avoid confusion.
Understanding the project
A to-do list app is basically a task management app used to create task, map out completed task ..read more
Zhullyblog
3y ago
Operators In Java
An operator is a symbol or character used to perform an operation. Take a good look at this
A + B
" + " Is the operator used here.
Types of Operator in Java
• Arithmetic Operator
• Assignment Operator
• Auto - increment and decrement operator
• Comparison Operator
• Logical Operator
• Bitwise operator
• Ternary operator
Arithmetic Operator
When we talk of arithmetic operator, we are talking about the general basic operator we use regularly to add , subtract , divide and multi ..read more