Know Your Java
Java is special Java source code Byte code/ native code Object code on windows Object code on Dos Object code on Lynux
Java Development Kit It contains Java Tools API (Application Programming Interface)/ Class Library
Java tools javac – compiler java – interpreter javap – disassembler jdb – debugger javah – header javadoc – for HTML programs java applet viewer
Learning more about tools javac compiles source code to byte code/ native code java further interpretes the byte code disassembler gives back the source code from object code i.e. native code debugger helps in removing the bugs from the program
Learning more about tools javah helps in creating internal header files javadoc enables programming through html documents javaappletviewer enables to work with applets(applications on net)
Application Program Interface java.lang – classes String, Math, etc java.io – classes related to ip /op java.applet – to support generate applets java.net – to support classes for net operations java.awt – abstract window tool kit It supports classes to create GUI It supports classes to create GUI
Application Program Interface java.txt – supports text elements java.math – supports mathematical functions java.util – has utility classes like Date, Time, StringTokenizer
What is a wrapper class? Wrapper classes are part of java’s standard library java.lang These convert primitive data type in an object. That is why primitive data type in lower case Wrapper class name begins with upper case.
What is a wrapper class? Wrapper class wraps a value of primitive type in an object All the methods of the wrapper classes are static. The Wrapper class does not contain constructors. Once a value is assigned to a wrapper class instance it can not be changed, anymore. These objects can use methods of these wrapper class. –E.g. parseInt is a method of class Integer
Important structure of wrapper classes in Java.lang Object CharacterNumber ByteIntegerShortLong FloatDouble VoidBoolean
Syntactical difference Primitive data type –int a =5; Wrapper class –Integer a = new Integer (5); Converting primitive type to object –int aa =5; –Integer a = new Integer (aa);
Some Java Acronyms jvm – java virtual machine Name of java interpreter jar – java archive files Directly executable files from any environment jdbc – java data base connectivity Just the name of the feature This feature of java makes it powerful programming medium on the net