CS3101-3 Programming Language-Java Fall 2004 Sept.29
CS3101-3 Programming Language – Java Fall 2004 Sept. 29
Road Map today ●Java review ●Homework review ●Exception revisited ●Containers ●l/O
Road Map today lJava review lHomework review lException revisited lContainers lI/O
What is Java OA programming language OA virtual machine JVM OA runtime environment -JRE OPredefined libraries ●Portable,but slow OInterpreter OJIT helps
What is Java lA programming language lA virtual machine – JVM lA runtime environment – JRE ¡Predefined libraries lPortable, but slow ¡Interpreter ¡JIT helps
Object and class ●A class is a blueprint OAn object is an instance created from that blueprint DAll objects of the same class have the same set of attributes OEvery Person object have name,weight,height o But different value for those attributes Oke.name=Ke Wang,sal.name=Sal Stolfo
Object and class lA class is a blueprint lAn object is an instance created from that blueprint lAll objects of the same class have the same set of attributes ¡Every Person object have name, weight, height lBut different value for those attributes ¡ke.name=Ke Wang, sal.name=Sal Stolfo
Class Person:illustration Name:Ke Wang ke height:0 weight:0 Name:Salvatore J.Stolfo sal height:0 weight:0
Class Person: illustration Name: Ke Wang height: 0 weight: 0 Name: Salvatore J. Stolfo height: 0 weight: 0 ke sal