JAVA- Conditional operator statement

The conditional operator statement is used with the combination of ? and : and this is known as conditional operator. Syntax:                         conditional expression ? expression1 : expression2 The conditional …

JAVA- Switch statement

The problem in if-statement is the complexity to read and follow. Even it may be confuse the programmer who designed it. The switch statement tests the value of the variable …

JAVA- if statement

The if statement is use to control the flow of the execution of statement. If the expression is true then it transfers the control to the particular statement. There are …

JAVA Branching statements

The branching statements are also called decision making statement which is used to see whether a particular condition has occurred or not and then tell the compiler to execute certain …

First java program

To understand how to create a program we have the following simple program. class  Hello { public static void main(string args[]) { system.out.println(“hello this is my first java program”); } …

Java Inheritance

The most significant advantage of object oriented programming is the reusability of the code. This reusability achieved by a mechanism called inheritance.  Inheritance is also refer to as “is-a” relationship. …

Java Polymorphism

Polymorphism is combination of two words ‘poly’ means many and ‘morph’ means forms. It is the ability to take more than one form. Polymorphism allows one interface to be used …

java Encapsulation

encapsulation is a mechanism for wrapping up data and methods to the single unit called class. Doing so the data is not accessible to the outside world and is only …

java Objects and classes

The objects and classes are the main part of the oops programming. The objects can represent a place, a person and much more. The program objects should be like the …