Core Java.

In this article,What is core Java?, is explained in detail from the origin of the Java with examples.
Introduction to Java
Java is a simple and powerful object oriented programming language and it is in many respects similar to C++.Core Java or Java is a programming language, using which we can develop programs/applications and software for computers especially. It is intended to let application developers “write once, run anywhere” meaning that compiled Java code can run on all platforms that support Java/Core Java without the need for recompilation.
Ex: Calculator, Notepad, MS-Office applications, Internet applications, student applications, Banking applications etc..

Features of Java.

In this article, What are Features of Java? are explained in detail with real time examples. 
Features of java-javaform

Simple
The first features of Java is Simple.All the limitations of the traditional programming language like c,c++ were eliminated in Core Java and it is made simple to learn,easy to write programs with less number of lines and short period of time.

Installation of Java and Java path.

In this article,how to Installation of Java and Java path? are explained in detail with images shown.
It is recommended, before you proceed with the online Installation of Java, you may want to disable your Internet firewall. In some cases, the default firewall settings are set to reject all automatic or online installations such as the Java online installation of Java. If the firewall is not configured appropriately it may stall the download/install operation of Java under certain conditions. Refer to your specific Internet firewall manual for instructions on how to disable your Internet Firewall.
This Article gives you the information about installation of java and setting the path to java to download java software go through the link.

Step by step installation of Java standard edition software is clearly mentioned below.

Verification of Java Path.

In this article,what is  Java path? and Verification of Java path? is explained in detail with images of how to set the path.
The class path variable is one way to tell the applications, including the Java Development Kit (JDK) tools, where to look for user classes.(Classes that are part of the JRE,JDK platform, and extensions should be defined through other means, such as the class path or the extensions directory).
Step 1:Open the command prompt by typing cmd in the start menu or you can directly open by pressing (windows+r) and type CMD.

Verification of java path-javaform

First/Sample Program using Java.

In this article, how to write First/Sample Program using Java is explained in detail. We can write a simple java program easily after installing the JDK.
It's time to write your first program! The following instructions are for users of Windows vista and Windows XP. To create a simple java program, you need to create a class that contains the main method. Your first application will simply display the greeting "Hello world!"
To create the First/Sample Program using Java, follow the program.   (From topic how to write First/Sample Program using Java)
Ex:1
//program related to First/Sample Program using Java. 
class sample{
Public static void main(String args[]){
System.out.println("Hello world!.");

Basic Structure and Fundamentals of Java.

In this article, What are Basic Structure and Fundamentals of Java? is explained in detail.We will learn about the basic structure of Java program.This structure consists of
  • Documentation Section.
  • Package Statements.
  • Class Definitions.
  • Class with main() method definition.

Fundamentals of Java|Java tokens.

In this article, what are Fundamentals of Java|Java tokens? is explained in detail. Tokens are different entities (individual units), using which we write java programs.These Fundamentals of Java|Java tokens. Java tokens are classified as follows.
JavaTokens-javaform

Interfaces.

Interfaces are pure abstract classes i.e, all the methods in an interface are abstract methods only.
Hence interface is also known as "Skeleton-class ".
Interface is a keyword used to declare it.
Ex
interface A
{
void m1();
void m2();
}
Here keyword abstract is optional while declaring abstract methods of an interface.
inheritance can contain data members.By default, these data members are public static final.
Ex
interface A
{
public static final int a=10;
public static final in b=20;
int c=30;
void m1();
void m2();
}
Such data members can be access directly with interface name.
Interface object can't be created because it is purely incomplete class.
A obj=new A(); //Error..
How to use interface
Since interface object can't be created,we have to inherit the interface.
Implement is a keyword using which we inherit an interface.
The class which inherits interface should be redefined all the abstract methods or interface.
The class which inherits interface should redefine all the abstract methods or interface otherwise such sub-class also becomes an incomplete class or abstract class and this class can't be instantiated.
Ex
class B implements A
{
int x,y;
void m1()
{
System.out.println("m1() Method");
}
void m2()
{
System.out.printnln("m2() Method");
}
void m3()
{
System.out.println("m3() method");
}
}
class InterfaceExample
{
public static void main(String args[])
{
//A obj=new A(); //Error..
A a;
System.out.printnln("A value="+A.a);
System.out.printnln("B value="+A.b);
System.out.printnln("C value="+A.c);
a=new B();
a.m1();
a.m2();
a.m3();
B b=new B()
b.x=11;
b.y=22;
System.out.printnln("X value="+b.x);
System.out.printnln("Y value="+b.y);
b.m1();
b.m2();
b.m3();
}
}
Output

Ex
//program related to interfaces
Interface interface1
{
/*final*/ int x=10;
Static int x=20; // by default its final,public.
Void method1();
Void method2();
/*void method3() //error—because no complete method
{
System.out.println(“Inside method3()”);
}
*/
Class InterfaceExample implement Interface1
{
Public void method1()
{
System.out.println(“Inside method 1()”);
}
Public void method2()
{
System.out.printnln(“Inside method2()”);
}
Public static void main(String args[])
{
Interface obj1=new Interface1(); //error no-object
Interface1 obj1;
InterfaceExample obj2=new interfaceExample();
Obj2.method1();
Obj2.method2();
//obj2.x=obj2.x+10 //if final in interface
System.out.println(“X:::”+obj2.x);
//Interface1.y=Interface1.y+10; //by default its final
//obj2.y=obj2.y+10; //by default its final
System.out.println(“y:::”+ Interface1.y);
Obj=obj2;
Obj.method1();
Obj.method2();
Interface1 obj3=new InterfaceExample();
Obj3.Method1();
Obj3.method2();
System.out.println(obj3);
}
}
Output

Multiple Inheritance in Java through interfaces.
Java doesn't support multiple inheritance through classes i.e, 2 or more base classes giving derivation to one sub-class. i.e not possible in Java.
Multiple inheritance-javaform
However, this concept can be implemented through interfaces.
MultipleInheritance-Javaform
Ex
class C extends A implements B
Here Sub-Class 'C' should redefine all the abstract methods of base-class as well as interface otherwise such class becomes an abstract class and it can't be instantiated.
Note:
i)A class extends class for inheritance
class extends-Javaform
Ex
class B extends A
{---
---
}
ii)A class implements interface for inheritance.
implements interface-javaform
Ex.
class implements A
{---
----
}
iii)An interface extends another interface for inheritance.

interface extends-Javaform
Ex
Interface B extends A
{
---
---
}
iv) Interface can't inherit class.
Interface can't inherit-javaform
This case is not possible.
Because class contains complete methods and such methods are inherited to interface but interface can’t have complete methods.

Ex
//Multiple inheritance through interface
interface Interface1
{
void method1();
void method2();
}
class Example1
{
void method3()
{
System.out.println("Inside Method3()");
}
}
class MultipleInheritance extends Example1 implements Interface1
{
public void method1()
{
System.out.println("Inside Method()");
}
public void method2()
{
System.out.println("Inside method2()");
}
public static void main(String args[])
{
//Interface1 obj=new Interface1()
Interface1 obj;
MultipleInheritance obj2=new MultipleInheritance();
obj2.method1();
obj2.method2();
obj2.method3();
obj=obj2;
obj.method1();
obj.method2();
//obj.method3();
Interface1 obj3=new MultipleInheritance();
obj3.method1();
obj3.method2();
//obj3.method3();
System.out.println(obj3);
//Reference variable of Example1 class
Example1 obj4=new MultipleInheritance();
//obj4.method1();
//obj4.method2();
obj4.method3();
}
}

                     Do check my new startup Surprise Planners in HyderabadLavish Surprises

Hi Friends, Please comment down your views in the comment section below. Thank you...

Fundamentals of Java|Data types.

In this article,what are Fundamentals of Java|Data types? is explained in detail with examples.
In software engineering and PC programming, a data type is an order of information which tells the compiler or interpreter how the developer expects to utilise the information. Most programming holds different types of information, for instance: real, integer or Boolean. A Fundamentals of Java|Data types, data type gives an arrangement of qualities from which an expression (i.e. variable, work ...) may take its qualities. The type characterises the operations that should be possible on the information, the significance of the information, and the way estimations of that sort can be put away.
The Data which is processed in a program to perform some operations is represented by data types.
Java supports two types of  data types. (From the topic what are Fundamentals of Java|Data types)
Fundamentals of Java|Data types-javaform

Declaring Variables in Java.

In this article, Major Google Updates to know are explained in detail with clear description.
Major update It can affect all the websites available in the Google database.
Major Google Updates to Know-Javaform

Class and objects in Java.

In this article,Class and objects in Java are explained in detail, we will come to know about the Class and objects in java,What is are the definitions of object,state,class,behaviour,identity,use of object in java program.
Object
Object is a physical product representing a particular class and is used by end-customer.
Ex
  • A physically constructed house by an Engineer which is ready to occupy in an Object.
  • Maruti Suzuki alto 800 AC car.
  • A Hyundai grand i10 sportz model car.   (From topic Class and objects in Java)

Methods in Java.

In this article,Methods in Java is explained in detail with examples.
A Java technique is a gathering of Statements that are assembled together to implement an operation. When you call the System.out.println() technique, for example, the system really executes a few testimony with a specific end goal to show a message on the console.
Presently you will figure out how to make your own strategies with or without return values, request a technique with or without parameters, and apply strategy in the program plan.In this article, we are going to learn about the methods in java with examples. (From topic Methods in Java)
In Java, methods are nothing but functions in C and C++. A methods in Java is a sub-program which is used to perform a specific task in your main program.
Methods are of two types.

Categories of Java and Program using two classes.

In this article,Categories of Java and Program using two classes explained in detail with examples. we will come to know about the information on how methods are created and categorized with examples provided with output and code file.
Based on return type and parameters,methods in java are categorized into 4 type.
  • Methods without return type and without parameters.
  • Methods without return type and with parameters.
  • Methods with return type and without parameters.
  • Methods with return type and with parameters. 
//Program based on Categories of Java and Program using two classes.
class example                (From the topic Categories of Java and Program using two classes)
{
//without return type and without parameters.

Java variables and program of variables.

In this article, what are Java variables and program of variables? are explained in detail with the examples. In a particular class of a java program,we can have three types of java variables.
  • Instance Variables.
  • Class Variables.
  • Local Variables.

Operators in Java.

In this article,Operators in Java is explained in detail with examples.
Operators in Java are special symbols, which are used to perform mathematical or other types of operations using values/operands in a program.
Ex:
a+b (+ operator)
a,b are values/operands.
Based on the type of operation and number of values used to perform an operation, Java operations/Operations in Java are divided into different types. (From topic Operators in Java) 
  • Arithmetic Operators.
  • Relational Operators.
  • Relational Operators.
  • Logical Operators.
  • Assignment Operators.

Relational and Logical Operators.

In this article, Relational and Logical Operators are explained in detail with examples. We will come to know about the Relational  and logical operators,truth table values for Logic AND, Logic OR and Logic NOT with examples provided.
They are also known as comparison operators because they compare two values and give the output as True/False. The operators are, (From topic Relational and Logical Operators)

Symbol
Description
Example
Less than
a<b
Greater than
a>b
<=
Less than or equal to
a<=b
>=
Greater than or equal to
a>=b
==
Equal to
a==b
!=
Not equal to
a!=b

Assignment and Unary Operators.

In this article,Assignment and Unary Operators are explained in detail with examples.We are going to learn about Assignment operators with an example.
This operator is used to assign to value to a variable. It is "=".
Ex
a=10;
b=20;
sum=a+b;
Compound Assignment.       (From topic Assignment and Unary Operators)
If assignment operator is used with basic arithmetic operators then we get compound assignments.

Ternary and Bitwise operators.

In this article,Ternary and Bitwise operators is explained in detail with examples.
It is also known as a conditional operator.Ternary means three values.The operator is '?'.
Syntax
(expre1)?(expre2):(expre3)
If expre1 is true then expre2 is executed. If expre1 is false then expre3 is executed.
Ex
//program related to Ternary and Bitwise operators-ternary operator.

String addition and Special Operators in Java.

In this article, String addition and Special Operators in Java are explained in detail with examples.
This operator is '+'. It is used to add or concate two or more string as a single string.
Ex
"Hello"+"World" =>"Helloworld"
It is also used to add a string with any value/variable and form a new string.
Ex
"sum is: "+(a+b)
Here value or variable is of any data type.

Typecasting in Java.

In this article,Typecasting in Java is explained in detail with examples.It is the process of converting one data type value into another datatype value.
In the java program, it is done in two ways.
  • Implicit type casting.
  • Explicit  type casting.
Implicit typecasting.
This casting is done by Java compiler automatically during the compilation process. This casting is done mainly in two situations.
Ex
1. In mathematical expressions, lower datatype values are automatically converted to higher datatype value.

Connect with Us by Subscribing here for more Updates..!

* indicates required