Array Manipulation

Array is a finite collection of similar datatype arranged in a adjacent manner. Array Syntax Method – 1 datatype arrayname[]=new datatype[size];  Method – 2 datatype arrayname[]; arrayname=new datatype[size]; Method – 3 datatype arrayname[]= {value1,vlaue2,…}; The following java program gets n numbers as inputs and prints the n numbers as output using array.

Read More

Static Properties and Methods

Static Properties 1.It will be created commonly only once for all objects. 2.It will be initialized only once when the first object is created , further initialization is not permitted. 3.It is visible within the class but lifetime is throughout the program. Static Methods 1.It can access only static members. 2.It can be invoked using…

Read More