Catch us on

Monday, March 28, 2016

You should know bout these before starting

Hello guys today I will make you aware bout those things which one should know before learning java.
  1. Class: it is a collection of similar type of objects which is used to keep same type of data together in java. Example class of student, collection of non-living things, vehicles are all the examples of class.
  2. Object: it is reference variable which is used to access members of a class which could be methods, variables etc.
  3. Methods: methods may be defined as a functions which are made to perform special type of tasks in a program.                                                                                                                   NOTE:  Every java program must contain a main() method which is the heart and soul of a java program.
  4. Data types: data types are integers, Boolean, double etc. which are used in a program frequently. Below is a table of data types and other information related to those which you should be aware of:-
Type
Size in Bytes
Range
byte
1 byte
-128 to 127
short
2 bytes
-32,768 to 32,767
int
4 bytes
-2,147,483,648 to 2,147,483, 647
long
8 bytes
-9,223,372,036,854,775,808 to 
9,223,372,036,854,775,807
float
4 bytes
approximately ±3.40282347 E+38F 
(6-7 significant decimal digits) 
Java implements IEEE 754 standard
double
8 bytes
approximately ±1.79769313486231570 E+308 
(15 significant decimal digits)
char
2 byte
0 to 65,536 (unsigned)
Boolean
not precisely defined*



  1. Keywords: they are the reserved names or sequence of characters which cannot be used as variable name or any other purpose. Example int cannot be used as a variable name.
  2. Identifiers: they are the names given to methods, variables, classes etc through which they are referenced.
They must start with an alphabet.
After an alphabet there could be any sequence of characters and numbers.
Identifiers are case sensitive

THANK YOU FOR READING THIS ARTICLE.
PLEASE SHARE IT ON FACEBOOK,TWITTER AND OTHER SOCIAL NETWORKS AND RECOMMEND YOUR FRIENDS TOO.
Kishan Agarwal


Please Share


No comments:

Post a Comment