Session 2 : Java Environment


Java Environment

Q? what are the features of Java.
/> WORE : Write Once Run Everywhere . Platform Independent
/> Dynamic : highly dynamic data structures, and we have a Run Time loading and linking of the data
/> No Memory Management Required: we have an automatic garbage collection here which leads to No Memory Leaks
/> Run-Time Checks,Compile-Time Checks , Strong Type Model and No Explicit Pointer makes it a Very Robust Language
/> We usually use exception mechanism to check errors
/> Very easy to use : cos share similar syntax with other programming languages likes C/C++
/> Hierarchic way of representing classes(types) i.e. inheritance
/> The first concept : class
/> source code of class stays in className.java file
/> execution of java starts from special method :
public static void main(String[] args)


Q? How does the process of Build and Run works in java
/1> First.java file is passed through java compiler (javac)
/2> Java compiler generates the byes code First.class (the extension of byte code is .class)
/3> java bytecode is passed through the Java Virtual machine and generates the output
Q? what does Java Virtual Machine (JVM) consists of.
/> It consist of Interpreter, Just In Timer (JIT) compiler and Run Time Compiler

Q? how JVM loades the class .
/> on the basis of classpath : (is the list of location where classes can be loaded )

Q? how java manages for large scale programming
/> By providing certain features like :
1> JavaDoc : Documentation on the info and use of the classes methods
2> Class Libraries (Packages) : built in collection of standard classes
Others Standard Utilities are :
1> GUI : Graphica User Interface Library
2> Concurrency (thread)
3> Network Programming (library)

Q? what is java development environment
/> It consist of Java SE (Software Essentials) 7 : http://www.oracle.com/technetwork/java/javase
this software essentials consists of :
javac Compiler
jdb debugger
JRE (Java Run Time Environment) – which consist of : JVM and some Native packages like (awt , swing, system......)
/> The Documentation is also privided to provide the info and use of all the in built classes and its methods : http://docs.oracle.com/javase/
/> Eclipse : This is the Integrated Development Environment (IDE) on which we compile, debug and run java programs.
Note: * eclipse use a different compiler than javac


Q? what are some coding conventions in java.
/> compound names : camelBackCapitalization not underscore
/> class names : Capitalized
/> method names, variables – object instance name – attributes : start in lower case
/> constants : all uppercases

Q? How import/export is done for java programs
/> all the java programs are packaged and deployed jar file

Q? what is this jar file
/> they are the compressed archives and contains some meta-info
/> we can easily execute this jar file from JVM


Comments

Popular Posts