Java

Basics of Java
Origins of the language :-

>> James Gosling and others at Sun, 1990 - 95
>> Oak language for “set-top box”
    (i) Small networked device with television display
    (ii) Graphics
    (iii) Execution of simple programs
    (iv) Communication between local program and remote site
    (v)  No “expert programmer” to deal with crash, etc.
>>  Internet application
    (i) Simple language for writing programs that can be transmitted over network


Sun’s JDK :-

JDK:- The Java Developers Kit (JDK) includes a standard set of classes that provide the core functions of Java.
The JDK includes several packages (groups of classes) that share common definitions.

Packages:- The language package (java.lang) contains the lowest level of required classes. For example, java.lang includes the Object class, the foundation of all user defined (and many Java defined) classes.
Different packages can contain objects of the same name – the fully qualified object name includes the package name for uniqueness. To simplify coding, a package can be imported into a class which removes the requirement to fully name packaged objects.

Included packages-

Some examples of included packages are:
-->  java.lang      -  Object, String, Thread, System, Math
-->  javax.swing  - Window, Button, Menu, Font, Border
-->  java.applet    - Applet, AudioClip,
-->  java.io          -  InputStream, OutputStream, File, StreamTokenizer

Java naming conventions :-
• Files HelloEmobi.java

• Classes HelloEmobi.class

• Methods main, showMessage

• Variables employeeName, birthDate

• Constants RETIREMENT_AGE

!! Everything in Java is case sensitive !!

No comments:

Post a Comment