For Quiz Preparation for TGES ,Go to General Knowledge Section

Thursday, May 28

What is Java ?? Some Basic Example of Java . Fundamental of Java.





What is Java ?? Some Basic Example of Java . Fundamental of Java.


What is Java ?
 We know that java is a highly secure and decent language. Most of Developer use java coding in his project. If you want to a developer so i think you have learn about java......here we will know that why java is popular why we should learn java language.
Definition:-  "Java is a free platform independent language it purely object oriented programming Language"
History Of Java- : Java language developed by Sun Microsystems  Company by James Gosling in 1995. Its developed for purpose of problem solving but now it develop many application and web application runs on java coding. 
Java have more feature to attract user its develop Applets but now its updated and use awt and Swing  feature to create Good Graphical User Interface.
Feature of Java :- 
 If we Talk about its feature so we have know that its popularity its run on any where if we are using mobile phone , playing games and using any software everywhere is Java.
(i) Its Object Oriented Programming Language.
(ii) its purely secure because nobody can't  easily hack .
Some important Tokens,...
  • Tokens :-  Tokens are use for the Java program elements identifiers by compiler . its smallest and understating to the compiler . some Keywords, Identifiers , Constants , variable, string and operators supported by Tokens.  
  • Keywords :- Java keywords are one the 50 reserved keyword but these keywords not use like identifiers .  Abstract, class public, import extends , for , while  etc are the keywords.
  • Identifiers :-  Identifier are the names of variables method,packages,classes and interfaces. if you want to create class and give the name that name called is identifier. its must be written in letters , underscore, and dollar sign . but identifiers start only letter.
  • Constants:-  Constant value we can't change when program is executed.This value  may be digit or character. 
There are two types of constant .
(i) Character constant :-   These constant is single or string constants like if its single constant 
  ( single letter) so its use with single quotes ('A') but its a string (means its name two or more letter make string ) so it use with double quotes("India").
(ii)  Numeric Constant :-  This type constant is a integer or real constant. real constant is if we enter any number like 34,44,-45 so its integer constant but we put 3.14, 0.589  value so its real constant because we know (Pai = 3.14) .Real constant always be real this value never be can change. 
  •  Data Types :-   Data types use for  to give memory space for data. if we put any value so its have some size so its size define in data type . It use for representing the data in main memory (RAM) of the computer.
There are five types of data type so its take some memory by its value size.
(i) boolean                  :-    Its has only default value (0) so it use only 1 bit.
(ii) int( integer)         :-       Its integer value like any digit so its take 2 bit.
(iii) char.                    :-  Its have character data  so its also have 1 bit.
(iv) float.                    :- Real Data like any fractional value  so its take 4 bit.
(v) double.                 :-    Twice the precision of float value so its take 8 bit.
  • Variable :-  Its can be digit,  number or both. like a.b or a2 b2. if we make any program so we can use variable that declare in data type because variable define that given value identify the data type.
Example :- Syntax-  Data type <variable,variable 2.>;
                                    int  a,b,c
                                    float d,f;
                                    char c,d,e;
there is a ,b,c,d,e,f are the variables.
 Some Examples Of Java Program.
Here We Write Some Program Of Java
First Example:- Hello Java Program In Java.
class HelloDemo
{
Public static void main (String [] args)
{
System.out.println("Hello Java");
}
}
          Save As:- HelloDemo.java
         Output:-  Hello Java
  


No comments:
Write Comments

Please ask any question about gk related

Total Pageviews

Popular Posts

© 2014 SSC GK.in . Designed by Bloggertheme9 | Distributed By Gooyaabi Templates
Powered by Blogger.