INTRO TO JAVA o Java programming language o The one we use to write our program o general-purpose o concurrent o class-based o object-oriented o Compiled to byte code of JVM
INTRO TO JAVA Java programming language The one we use to write our program general-purpose concurrent class-based object-oriented Compiled to byte code of JVM
JAVA IS PORTABLE, As long as there is a JVM compiled for that particular processor and OS Typical program,like C or C++,is compiled for a particular processor architecture and OS. ● "Write once,run everywhere!" 0 Sun's motto for Java
JAVA IS PORTABLE, As long as there is a JVM compiled for that particular processor and OS Typical program, like C or C++, is compiled for a particular processor architecture and OS. “Write once, run everywhere!” Sun’s motto for Java
Java virtual machine (JVM) o Java interpreter-interpret the compiled byte code o Software simulated CPU architecture Cross-platform:support Linux,Windows, PalmOS...etc. Java runtime environment (JRE) o Predefined set of java classes available to use 0( Core Java APIs-basic utilities,I/O,graphics, network... o Java development kit(JDK) o software that you can use to develop Java based software
Java virtual machine (JVM) Java interpreter – interpret the compiled byte code Software simulated CPU architecture Cross-platform: support Linux, Windows, PalmOS…etc. Java runtime environment (JRE) Predefined set of java classes available to use Core Java APIs – basic utilities, I/O, graphics, network… Java development kit(JDK) software that you can use to develop Java based software
BOTTOM LINE:SLOW BUT SAFE Not suitable for high-performance computation o Scientific computation,games,OS kernel o Compiled to byte codes of JVM,not native machine language instructions 0 New release of Java is improving the speed a lot .Just-in-time (JIT)compiler:convert byte codes to native machine language on the fly ●Very safe o No pointer o Automatic garbage collection o Check array access bound
BOTTOM LINE: SLOW BUT SAFE Not suitable for high-performance computation Scientific computation, games, OS kernel Compiled to byte codes of JVM, not native machine language instructions New release of Java is improving the speed a lot Just-in-time (JIT) compiler: convert byte codes to native machine language on the fly Very safe No pointer Automatic garbage collection Check array access bound
JAVA Java is an object-oriented language,with a syntax similar to C o Structured around objects and methods o A method is an action or something you do with the object Avoid those overly complicated features of C++: o Operator overloading,pointer,templates,friend class,etc
JAVA Java is an object-oriented language, with a syntax similar to C Structured around objects and methods A method is an action or something you do with the object Avoid those overly complicated features of C++: Operator overloading, pointer, templates, friend class, etc