Posts

Data Types In Java

Image
Primitive Data Types and Referenced Datatypes Premitive Data Types:  There are  eight primitive data types in Java " boolean"   :- the type whose values are either true or false "char" :-  the character type whose values are 16-bit Unicode characters (only single character ). ex: 'a' The arithmetic types: The integral types: "byte" (-128 .. 127 numeric range values) "short"(-32,768 .. 32,767 numeric range values) "int"(-2,147,483,648 .. 2,147,483,647 numeric range values ) "long"(-9,223,372,036,854,775,808 .. 9,223,372,036,854,775,807 numeric range values ) The floating-point types "float" "double" Referenced Datatypes: Referenced DataType is a varible defined  of a class for example : "String" is a class given in "java.lang" package if we want to represent a string (a group of characters) i.e "abcdef" we need to define a variabl

Purpose of "class" keyword

Java is an Object Oriented Programming System, every Object is to represent a Real-world Entity i.e (Book, Fan, Person, Product ), Real World Entities having properties for example "Book" is a Real World Entity can contain properties like " Book Title "," Author Name ",  "Publisher Name" ," price " e.t.c, if we want to represent this Real World Entity in java we use a special "keyword" called "class"  every property  represents a type like (integer, String , character, float or it can be any reference types ) BookTitle,, AuthorName, PublisherName    is simple String and the price is of float which accepts decimal values. ex : class Book{ String bookTitle; String authorName; String publisherName, float price; } above example represents a real world entity Book  and having its properties

Key Words in java :

Image
JAVA RESERVED KEY WORDS Above listed  are reserved keywords  those key words are not posible to provide as method name / classname / variable name , every key word is having special meaning and role to use NOTE:All the keywords contains only lowercase alphabet symbols Keywords for primitive data types : byte,short,int,long float,double,char,boolean Keywords for flow control: if,else,switch,case,default,while do,for,break,continue,return Keywords for exception handling: try,catch,finally,throw throws,assert(for debugging purpose,1.4v) Keywords for modifiers: public,private,protected,static,final,abstract synchronized,native,transient,volatile,strictfp(1.2v) Class related Keywords: class,package,import,extends implements,interface Object related Keywords: new,instanceof,super,this void return type Keyword if a method doesn’t return anything compulsory we should declare that method with void return type. Unused Keywords: goto(usage is considered as ha

Java software

Image
Java software consists of 2 types : 1)Jre(java run time environment). 2)Jdk(Java development kit). Over view of JDK,JRE:     OVER VIEW OF JDK,JRE JRE  (Java run time environment):                                     Jre consists of JVM(java virtual machine which converts byte code to machine understandable language) and utility classes to run.                                     This is used to run java apps in our system,if you want to run java apps you have to install jre. only Jre is  required to client to run java apps . JDK  (Java development kit):                                      Jdk is used by developers to write,compile and execute java programs .Jdk consists of Jre and developer tools such as compiler,debugger.

Types of files in java

Java has 2 types of files : 1)<file_name>.java(file name with java extension). 2)<class_name).class(class name with class extension). .java Extension files:                   it's source code (i.e developer written code). All source code files will save with ".java" extension. .class Extension files:                  it's prepared by java compiler which is in the format of "bite code" (i.e JVM understanding code).

why name Java ?

Java is just a name derived from cup of coffee, at the time of java invention they named it as OAK it’s also a name of a tree and this name is already registered. At that time coffee with name JAVA got popularity with its taste regarding to the popularity they decided to their software as Java so it contains coffee cup as its symbol.

What is java?

Java is an Object Oriented  Programming  System, it’s used to develop Internet applications by achieving Platform  In dependence . Java is simple, secure, robust, portable, architectural neutral, object oriented, multi-threaded, high performance, distributed and dynamic  Programming  System that supports us to develop Internet applications development by achieving platform  in dependency . History of JAVA : Refer below link if you are interested.  http://en.wikipedia.org/wiki/Java_(programming_language)