Objects, Distribution, and the Internet. Update on Java. Introduction, fundamentals and basic concepts. Outline

Size: px
Start display at page:

Download "Objects, Distribution, and the Internet. Update on Java. Introduction, fundamentals and basic concepts. Outline"

Transcription

1 Objects, Distribution, and the Internet Update on Java CIMPA INRIA UNESCO School Mérida,Universidad de los Andes (Venezuela) January 7-18, 2002 Richard Grin University de Nice - Sophia Antipolis (France) Thanks to Michel Buffa with whom I teach java courses at the University of Nice and who wrote the first translation in English of these slides. The courses of the first day is an overview of Java in order to be sure that anyone has the basic knowledge to attend next courses Java : introduction page 3 Java : introduction page 4 Outline Introduction, fundamentals and basic concepts n presentation and structure of the java language n Basic concepts of Object Oriented Programming n inheritance, abstract classes and interfaces n error handling n inner classes Threads Examples of API n java.io(serialization) n JDBC Introduction to Design Patterns Introduction, fundamentals and basic concepts Java : introduction page 5 1

2 Main characteristics of Java object-oriented uses classes Presentation of the language syntax close to C/C++ has a rich set of packages and some tools: the SDK (Software Developer s Kit) portable, because of the JVM (Java Virtual Machine) a goal: «Write once, run everywhere» Not so easy to achieve! Java : introduction page 7 Java : introduction page 8 Other important characteristics Compilation produces byte code multithreaded robust n strong typing n many checks at runtime n no pointers, only references to existing objects n garbage collection suited to Internet n dynamic class loading through the network, at runtime n facilities for writing distributed applications (sockets, RMI, Corba) n secure (inside the language, API and tools) Byte code is independent of the computer Program source AClass.java Compiler Byte code AClass.class Java : introduction page 9 Java : introduction page 10 The Java Virtual Machine (JVM) Java platform The JVM (Java Virtual Machine) executes byte code; it translates bytecode into native code before executing it Checks many things to ensure that the byte code does not try to do something dangerous => a little slow... (improved by the «Just In Time» compilers and hotspot techniques) But very good portability and security Java Program API JVM Real Machine Java : introduction page 11 Java : introduction page 12 2

3 3 editions Everything is in classes... J2SE : Java 2 Standard Edition J2EE : Enterprise Edition to write server side applications: servlet, JSP, EJB, J2ME : Micro Edition, light version to write embedded applications for javacard, mobiles, In Java, code is only allowed within a class A source program is made of several files that contain classes definitions Java : introduction page 13 Java : introduction page 14 Dynamic class loading Classpath Dynamic loading of classes during execution; no need to have all the classes in memory before starting execution A class is loaded at runtime by a ClassLoader The classpath contains the local search paths for the classes n from the local computer, n remotely, through the network n from database n Every class loader has its own security policy (cannot load any class) Java : introduction page 15 Java : introduction page 16 Two types of programs Independent application Independent application Applet executed within a web browser. Comes embedded in an HTML page Run with : java Circle The entry point of the executable file is the main method of the Circle class public static void main(string[] args) Java : introduction page 17 Java : introduction page 18 3

4 Applet Steps for running an applet No main method (not always) An applet is run by the JVM of a Web Browser, when it s area in an HTML page is showed The Browser comes with its own JVM. It runs a Java program that, in turn, will load and run the java applets. It calls some particular methods : init(), start(), stop(), destroy() The browser has its own Class Loader with its own security policy (sandbox) HTTP Client 3. ClientJVM executes the applet 1. Ask for the HTML page which contains the applet 2. Loading Web page and then class of the applet HTTP Server Java : introduction page 19 Java : introduction page 20 Architecture of a java source program Classes and Objects Source of a Java application = n set of «.java» files n resource files: images, sounds, security, url of dbms, messages for internationalization, Each «.java» file contains one or more class (or interfaces) definitions A «.java» file contains at most onepublic class definition (with the file name = name of the public class) Java : introduction page 21 Java : introduction page 22 An application is made of objects Application functionalities offered by dynamic collaboration between objects Objects of same type modeled by a class Java : introduction page 23 Interactions between objects Objects interact by sending messages Methods of the class of an object «synchronous messages you can send to it: when the object receives a message, it executes the corresponding method Examples : object1.describeyourself(); employee.setsalary(20000); car.start(); car.setspeed(50); Receiver Sent message Java : introduction page 24 4

5 Class A class is a template to create objects, called instances of the class A class is made of : n variables (or fields, or attributes): give the instance state n constructors: create the instances n methods: define the types of the messages you can send to the object Variables and methods are called the members of the class Java : introduction page 25 Example : the Book class public class Book { private String title, author; Variables private int nbpages; // Constructor public Book(String atitle, String anauthor) { title = atitle; author = anauthor; public String getauthor() { return author; Constructors // an accessor public void setnbpages(int n) { // a modifier nbpages = nb; Methods Java : introduction page 26 Classes and instances An instance of a class is created by a constructor of the class Once created, the instance n has its own internal state (variables values) n shares the code that determines its behavior (methods) with other instances of the same class Constructors Java : introduction page 27 Java : introduction page 28 Constructors Each class has one or more constructors. A constructor n creates the instances n sets their initial state (initialize variables) A constructor has n the same name as the class n no return type n no return instruction Java : introduction page 29 Creation of an instance public class Employee { private String lastname, firstname; private double salary; public Employee(String ln, String fn) { lastname = ln; firstname = fn; public static void main(string[] args) { Employee e1 = new Employee("Dupond", "Pierre"); e1.setsalary(12000);... Java : introduction page 30 5

6 Several constructors (overloading) public class Employee { private String lastname, firstname; private double salary; // 2 Constructors public Employee(String ln, String fn) { lastname = ln; firstname = fn; public Employee(String ln, String fn, double s) { lastname = ln; firstname = fn; salary = s;... e1 = new Employee("Drake", "Peter"); e2 = new Employee("Smith", "John", 15000); Java : introduction page 31 Call another constructor with this() public class Employee { private String name, firstname; private double salary; // This constructor calls the other one public Employee(String n, String fn) { this(ln, fn, 0); public Employee(String ln, String fn, double s) { lastname = ln; firstname = fn; salary = s;... e1 = new Employee("Drake", "Peter"); e2 = new Employee("Smith", "John", 15000); Java : introduction page 32 The Default Constructor If a class has no constructor, Java adds automatically a constructor The code of this default constructor is [public] Classe() { Methods Same accessibility as the class (public or not) Java : introduction page 33 Java : introduction page 34 Types of methods Accessors: they reads the state of the object (value of a variable) Modifiers: they modifie the state Other methods that offer more complex services Private methods are accessible only from their class; they are utilities for the other methods Java : introduction page 35 Instance method example public class Employee { private double salary; Modifier... public void setsalary(double asalary) { if (asalary >= 0.0) salary = asalary; public double getsalary() { return salary;... Accessor Java : introduction page 36 6

7 Overloading In Java, you can overload a method: add a method with the same name but not the same signature as another method: double computesalary(int index) double computesalary(int index, double bonus) It is forbidden to overload a method only by changing the return type: int computesalary(int index) Variables Java : introduction page 37 Java : introduction page 38 Types of variables Initialization of a Variable Instance variables: n declared outside any method n accessible and shared by all the methods Local variables: n declared inside a method n accessible only in the internal block where they are declared, from their declaration to the end of the block A variable must be initialized before being used Instances variable are automatically initialized if you don t initialize them Java : introduction page 39 Java : introduction page 40 Declaration / creation public static void main(string[] args) { Employee e1; e1.setsalary(12000); throws a NullPointerException «Employee e1;» n declare the e1 variable that will be a reference to an object of the Employee class n but no object has been created! We shouldhave written: Employee e1; e1 = new Employee("Drake", "John"); e1.setsalary(12000); Java : introduction page 41 Naming instance members In the code of another class (but variables are often private): circle1.radius Send a message to an instance: circle1.draw() Java : introduction page 42 7

8 this In an instance method you use this to designate the instance that received the message, the current instance this can be implicit when you work with members of the current instance Implicit this public class Employee {... public void setsalary(double asalary) { salary = asalary; public double getsalary() { return salary;... Implicitly this.salary Implicitly this.salary Java : introduction page 43 Java : introduction page 44 Explicit this this is mainly used: n to distinguish between instance variables and parameter withthe same name: public void setsalary(double salary) this.salary = salary; Class members (static) n when an object wants to pass a reference of itself to an another object: salary =accountant.computesalary(this); Accountant, «compute my salary» Java : introduction page 45 Java : introduction page 46 Class variables Some variables may be shared by all the instances of a class. They are called class variables (static modifier in Java) Unshared variables (whose value differs from one instance to another) are called instance variables Example of a static variable public class Employee { private String name, firstname; private double salary; private static int nbemployees = 0; // Constructor public Employee(String n, String p) { name = n; firstname = p; nbemployees++; Java : introduction page 47 Java : introduction page 48 8

9 Class methods Work with a class method A class method (static modifier in Java) performs an action not related to a particular instance; it corresponds to a message sent to the class Exemple : static int nbemployees() { return nbemployees; To manipulate a static method from another class code, prefix its name by the name of the class it belongs to: int n = Employee.nbEmployees(); Java : introduction page 49 Java : introduction page 50 Static initialization blocks static blocks can be used to perform complex variable initializations of static variables : class aclass { static int[] anarray = new int[25]; static { for (int i = 0; i < 25; i++) {... // initialization of anarray // end of the static block... static block is executed when the class is loaded in memory Java : introduction page 51 Member accessibility Java : introduction page 52 Access to members private : only the class where the member is defined can use it public : all classes can use it Otherwise, by default, only the classes belonging to the same package as the member class can use it protected : subclasses may manipulate the inherited protected member (studied later) Encapsulation Protect as much as you can the object state (instance variables). Use private! If an instance variable is readable, provide a public accessor, a method that return the value of the variable If you want to allow the modification of an instance variable, provide a public modifier, a method that will modify the variable, verifying that the modification is valid Java : introduction page 53 Java : introduction page 54 9

10 The granularity of encapsulation is the class UML (Unified Modeling Language) In Java, instance variable protection is class by class, not object by object An object can access all the attributes of another object of the same class, even private attributes Circle privatepoint center private int radius public Circle(Point, int) public void setrdius(int) public int getradius() public double surface() Circle - Point center - int radius + Circle(Point, int) + void setradius(int) + int getradius() + double surface() (- : private,#:protected, + : public, $ : static) Java : introduction page 55 Java : introduction page 56 Data types in Java In java you manipulate 2 kinds of data types: n primitive types n objects (instances) Data types in Java Java manipulates differently these 2 types; variables contain n primitive values n references to objects Java : introduction page 57 Java : introduction page 58 boolean (true/false) Primitive types integers : byte (1 byte), short (2 bytes), int (4 bytes), long (8 bytes) floating point numbers : float (4 bytes), double (8 bytes). character (only one) : char (2 bytes) Unicode encoded (not ASCII) Named constants The final modifier keyword indicates that the value of a variable cannot be modified. Exemple : double static final PI = 3.14; Java : introduction page 59 Java : introduction page 60 10

11 int m() { A a1, a2; Work with references a1 = new A(); a1 = a2;... What happens when m() is called? int m() { A a1 = new A(); A a2 = a1;... a1 a2 Références Java : introduction page 61 Stack Heap Java : introduction page 62 int m() { A a1 = new A(); A a2 = a1;... Références int m() { A a1 = new A(); A a2 = a1;... Références a1 a2 Instance of A a1 a2 Instance of A Stack Heap Stack Heap Java : introduction page 63 Java : introduction page 64 int m() { A a1 = new A(); A a2 = a1;... Références After the execution of the method m, the instance of A is no longer referenced but it stays in the heap a1 a2 Instance of A Instance of A Stack Heap Stack Heap Java : introduction page 65 Introduction Java : introduction à Java page 66 11

12 ... the garbage collector will make its job later... Garbage collector The garbage collector is a task that n works in background Instance de A n frees the memory from unreferenced instances n compacts free blocks Runs n when the system needs memory n randomly with a low priority n called explicitly by some programmer code Stack Heap Java : introduction page 67 Java : introduction page 68 final variable Cast final variable: n If the variable has a primitive type, its value cannot be changed n If the variable references an object, it will not be able to reference another object, but the referenced object can be changed final Employee e = new Employee("John"); e.name = "Smith"; e.setsalary(12000); e = e2; // Not! In some case you may want to manipulate an expression with a type different from its declared type This is called a cast : (enforced type) expression int x = 10, y = 3; double z = (double) x/ y; Java : introduction page 69 Java : introduction page 70 Authorized Casts In Java, only 2 kind of casts are authorized: n between primitive types, n between superclasses and subclasses (inheritance) Lexical structures Java : introduction page 71 Java : introduction page 72 12

13 Unicode For identifiers, comments, chars or Strings, Java uses Unicode version 2.0 characters (encoded on 2 bytes) ASCII characters are the 128 first characters of Unicode In a source, the Unicode char whose code is xxxx (hexa) may be written \uxxxx Java name conventions Class names start with a capital letter (they are the only ones): Circle, Object Words contained within an identifier name are Capitalized: AClasse, amethod, avariable, amethodwithalongname Constants are in uppercase with a «_» between words: A_CONSTANT Java : introduction page 73 Java : introduction page 74 Comments One line : // Here is a comment int bonus = 1500; // end of month bonus Several lines : /* first line of comment second line */ javadoc style /** * This method computes... */ Arrays and basic classes Java : introduction page 75 Java : introduction page 76 Arrays In Java Arrays are Objects (inherits from Object): n array variables reference instances n arrays are created by the new operator n They have an instance variable : final int length However Java has a particular syntax for: n array declaration n array initialization Object arrays Common mistake : initialize an array and use the objects from the array before they have been created Employee[] tabemp = new Employee[100]; tabemp[0].setname("dupond"); Employee[] tabemp = new Employee[100]; tabemp[0] = new Employee(); tabemp[0].setname("dupond"); Creation of the 1st employee Java : introduction page 77 Java : introduction page 78 13

14 Strings 2 classes : String for constant strings and StringBuffer for variable strings. Use String except for the strings that will be modified often Shortcut to initialize String objects : string = "Hello"; // instead of new String("Hello"); String concatenation String s = "Hello" + " my friends"; If one of the two operands is a String, then the other operand will be converted to String (by the tostring() method if it is an object): int x = 5; s = "Valeur de x = " + x; Java : introduction page 79 Java : introduction page 80 Wrapper classes for primitive types In certain cases you will need to manipulate objects (instances) and not primitivetypes For example, an ArrayList (extensible array ) can only contain objects The java.lang package provides wrapper classes in order to encapsulate primitive types : Byte, Short, Integer, Long, Float, Double, Boolean, Character Control flows Java : introduction page 81 Java : introduction page 82 Hide a variable in a block? Java does not allow the declaration of an identifier in a block if the including block contains an identifier with the same name int sum(int init) { int i = init; int j = 0; for (int i = 0; i < 10; i++) { j += i; loop instructions break exits from the loop and continues after the loop continue stops the iteration in progress and begins the next iteration Java : introduction page 83 Java : introduction page 84 14

15 Example of continue and break int sum = 0; for (int i = 0; i < tab.length; i++) { if (tab[i] == 0) break; if (tab[i] < 0) continue; sum += tab[i]; System.out.println(tab[i]); System.out.println(sum); Writing methods Java : introduction page 85 Java : introduction page 86 Method header [accessibility] [static] ret -type name([param-list]) public protected private void int Circle... public double salary() int static nbemployees() public void setsalary(double asalary) private int computebonus(int bonustype, double salary) public int m(int i, int j, int k) Java : introduction page 87 Passing parameters Always by value But, for objects, the reference is passed by value So, n if the method modifies the referenced object, the object will be modified even outside of the method n if the method changes the reference, no effects outside Java : introduction page 88 Example of parameter passing public void m(int i, Employee e1, Employee e2) { i = 100; e1.salary = 100; e2 = new Employee("Pierre", 100); public static void main(string[] args) { Employee e1 = new Employee("Patrick", 10000); Employee e2 = new Employee("Bernard", 10000); int i = 10; m(i, e1, e2); System.out.println(i + '\n' + e1.salary + '\n' + e2.salary); Prints final parameters The keywordfinal indicates that a parameter is not modifiable in the method. If primitive type, the value can t be modified : int m(final int x) Otherwise, the reference of the object can t be modified but the object can be modified: int m(final Employe e1) Java : introduction page 89 Java : introduction page 90 15

16 Return value of a method return expression return i * j; return new Circle(p, x+y); Packages Java : introduction page 91 Java : introduction page 92 Packages: definition Main packages in the SDK Java classes are grouped into packages They correspond to other languages libraries, like C, Fortran, Ada, etc... Packages offer an extra modularity level n group classes depending on their functionalities n protect access to class members The JDK comes with a lot of packages java.lang: basic classes (automatically included) java.util: utilities java.io: inputs and outputs java.awt: GUI java.applet: applets java.net: network java.rmi: distributed objects javax.swing: GUI Java : introduction page 93 Java : introduction page 94 Import classes from a package You can n import a class from the package: import java.util.arraylist; n import all the classes of a package : import java.util.*; Then you can refer to the class by its name: ArrayList list = new ArrayList(); Else you have to use the qualified name of the class: java.util.arraylist list = java.util.arraylist(); Make your own packages package package-name; Must be the first instruction in the «.java» file By default, the «.java» file belongs to the default package. This default package is anonymous and contains all the classes in the same directory Java : introduction page 95 Java : introduction page 96 16

17 Subpackages A package can contain sub packages For example, the java.awt package contains the java.awt.event package Importation of a package does not import sub packages; you need to write : import java.awt.*; import java.awt.event.*; Name and location of packages Usage is to prefix the name of the package by your address, fr.unice.grin.liste The.class file location in the file system must correspond to the name of the package: fr/unice/grin/liste/foo.class And the fr directory must be included in one of the directories indicated by the CLASSPATH variable Java : introduction page 97 Java : introduction page 98 Encapsulation of a class in a package If the class definition starts with public class the class is available from anywhere. If the keyword class is not preceded by public, the class can only be accessed from the classes of the same package Executing a class of a package Launch execution of the main method of a class by giving its qualified name For example, if the class C belongs to the p1.p2 package: java p1.p2.c Java : introduction page 99 Java : introduction page

Introduction to Visual Basic and Visual C++ Introduction to Java. JDK Editions. Overview. Lesson 13. Overview

Introduction to Visual Basic and Visual C++ Introduction to Java. JDK Editions. Overview. Lesson 13. Overview Introduction to Visual Basic and Visual C++ Introduction to Java Lesson 13 Overview I154-1-A A @ Peter Lo 2010 1 I154-1-A A @ Peter Lo 2010 2 Overview JDK Editions Before you can write and run the simple

More information

1 Shyam sir JAVA Notes

1 Shyam sir JAVA Notes 1 Shyam sir JAVA Notes 1. What is the most important feature of Java? Java is a platform independent language. 2. What do you mean by platform independence? Platform independence means that we can write

More information

Weiss Chapter 1 terminology (parenthesized numbers are page numbers)

Weiss Chapter 1 terminology (parenthesized numbers are page numbers) Weiss Chapter 1 terminology (parenthesized numbers are page numbers) assignment operators In Java, used to alter the value of a variable. These operators include =, +=, -=, *=, and /=. (9) autoincrement

More information

A Quick Tour p. 1 Getting Started p. 1 Variables p. 3 Comments in Code p. 6 Named Constants p. 6 Unicode Characters p. 8 Flow of Control p.

A Quick Tour p. 1 Getting Started p. 1 Variables p. 3 Comments in Code p. 6 Named Constants p. 6 Unicode Characters p. 8 Flow of Control p. A Quick Tour p. 1 Getting Started p. 1 Variables p. 3 Comments in Code p. 6 Named Constants p. 6 Unicode Characters p. 8 Flow of Control p. 9 Classes and Objects p. 11 Creating Objects p. 12 Static or

More information

Introduction to Programming Using Java (98-388)

Introduction to Programming Using Java (98-388) Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;

More information

Atelier Java - J1. Marwan Burelle. EPITA Première Année Cycle Ingénieur.

Atelier Java - J1. Marwan Burelle.  EPITA Première Année Cycle Ingénieur. marwan.burelle@lse.epita.fr http://wiki-prog.kh405.net Plan 1 2 Plan 3 4 Plan 1 2 3 4 A Bit of History JAVA was created in 1991 by James Gosling of SUN. The first public implementation (v1.0) in 1995.

More information

15CS45 : OBJECT ORIENTED CONCEPTS

15CS45 : OBJECT ORIENTED CONCEPTS 15CS45 : OBJECT ORIENTED CONCEPTS QUESTION BANK: What do you know about Java? What are the supported platforms by Java Programming Language? List any five features of Java? Why is Java Architectural Neutral?

More information

Java Programming Course Overview. Duration: 35 hours. Price: $900

Java Programming Course Overview. Duration: 35 hours. Price: $900 978.256.9077 admissions@brightstarinstitute.com Java Programming Duration: 35 hours Price: $900 Prerequisites: Basic programming skills in a structured language. Knowledge and experience with Object- Oriented

More information

Learning objectives. The Java Environment. Java timeline (cont d) Java timeline. Understand the basic features of Java

Learning objectives. The Java Environment. Java timeline (cont d) Java timeline. Understand the basic features of Java Learning objectives The Java Environment Understand the basic features of Java What are portability and robustness? Understand the concepts of bytecode and interpreter What is the JVM? Learn few coding

More information

Core JAVA Training Syllabus FEE: RS. 8000/-

Core JAVA Training Syllabus FEE: RS. 8000/- About JAVA Java is a high-level programming language, developed by James Gosling at Sun Microsystems as a core component of the Java platform. Java follows the "write once, run anywhere" concept, as it

More information

Java Intro 3. Java Intro 3. Class Libraries and the Java API. Outline

Java Intro 3. Java Intro 3. Class Libraries and the Java API. Outline Java Intro 3 9/7/2007 1 Java Intro 3 Outline Java API Packages Access Rules, Class Visibility Strings as Objects Wrapper classes Static Attributes & Methods Hello World details 9/7/2007 2 Class Libraries

More information

Outline. Overview. Control statements. Classes and methods. history and advantage how to: program, compile and execute 8 data types 3 types of errors

Outline. Overview. Control statements. Classes and methods. history and advantage how to: program, compile and execute 8 data types 3 types of errors Outline Overview history and advantage how to: program, compile and execute 8 data types 3 types of errors Control statements Selection and repetition statements Classes and methods methods... 2 Oak A

More information

Introduction to Java

Introduction to Java Introduction to Java Module 1: Getting started, Java Basics 22/01/2010 Prepared by Chris Panayiotou for EPL 233 1 Lab Objectives o Objective: Learn how to write, compile and execute HelloWorld.java Learn

More information

From C++ to Java. Duke CPS

From C++ to Java. Duke CPS From C++ to Java Java history: Oak, toaster-ovens, internet language, panacea What it is O-O language, not a hybrid (cf. C++) compiled to byte-code, executed on JVM byte-code is highly-portable, write

More information

Application Development in JAVA. Data Types, Variable, Comments & Operators. Part I: Core Java (J2SE) Getting Started

Application Development in JAVA. Data Types, Variable, Comments & Operators. Part I: Core Java (J2SE) Getting Started Application Development in JAVA Duration Lecture: Specialization x Hours Core Java (J2SE) & Advance Java (J2EE) Detailed Module Part I: Core Java (J2SE) Getting Started What is Java all about? Features

More information

The Sun s Java Certification and its Possible Role in the Joint Teaching Material

The Sun s Java Certification and its Possible Role in the Joint Teaching Material The Sun s Java Certification and its Possible Role in the Joint Teaching Material Nataša Ibrajter Faculty of Science Department of Mathematics and Informatics Novi Sad 1 Contents Kinds of Sun Certified

More information

Programming Language Concepts: Lecture 2

Programming Language Concepts: Lecture 2 Programming Language Concepts: Lecture 2 Madhavan Mukund Chennai Mathematical Institute madhavan@cmi.ac.in http://www.cmi.ac.in/~madhavan/courses/pl2009 PLC 2009, Lecture 2, 19 January 2009 Classes and

More information

1 OBJECT-ORIENTED PROGRAMMING 1

1 OBJECT-ORIENTED PROGRAMMING 1 PREFACE xvii 1 OBJECT-ORIENTED PROGRAMMING 1 1.1 Object-Oriented and Procedural Programming 2 Top-Down Design and Procedural Programming, 3 Problems with Top-Down Design, 3 Classes and Objects, 4 Fields

More information

Java Overview An introduction to the Java Programming Language

Java Overview An introduction to the Java Programming Language Java Overview An introduction to the Java Programming Language Produced by: Eamonn de Leastar (edeleastar@wit.ie) Dr. Siobhan Drohan (sdrohan@wit.ie) Department of Computing and Mathematics http://www.wit.ie/

More information

1Z Java SE 5 and 6, Certified Associate Exam Summary Syllabus Questions

1Z Java SE 5 and 6, Certified Associate Exam Summary Syllabus Questions 1Z0-850 Java SE 5 and 6, Certified Associate Exam Summary Syllabus Questions Table of Contents Introduction to 1Z0-850 Exam on Java SE 5 and 6, Certified Associate... 2 Oracle 1Z0-850 Certification Details:...

More information

1. Java is a... language. A. moderate typed B. strogly typed C. weakly typed D. none of these. Answer: B

1. Java is a... language. A. moderate typed B. strogly typed C. weakly typed D. none of these. Answer: B 1. Java is a... language. A. moderate typed B. strogly typed C. weakly typed D. none of these 2. How many primitive data types are there in Java? A. 5 B. 6 C. 7 D. 8 3. In Java byte, short, int and long

More information

Syllabus & Curriculum for Certificate Course in Java. CALL: , for Queries

Syllabus & Curriculum for Certificate Course in Java. CALL: , for Queries 1 CONTENTS 1. Introduction to Java 2. Holding Data 3. Controllin g the f l o w 4. Object Oriented Programming Concepts 5. Inheritance & Packaging 6. Handling Error/Exceptions 7. Handling Strings 8. Threads

More information

Java Training JAVA. Introduction of Java

Java Training JAVA. Introduction of Java Java Training Building or rewriting a system completely in Java means starting from the scratch. We engage in the seamless and stable operations of Java technology to deliver innovative and functional

More information

[Course Overview] After completing this module you are ready to: Develop Desktop applications, Networking & Multi-threaded programs in java.

[Course Overview] After completing this module you are ready to: Develop Desktop applications, Networking & Multi-threaded programs in java. [Course Overview] The Core Java technologies and application programming interfaces (APIs) are the foundation of the Java Platform, Standard Edition (Java SE). They are used in all classes of Java programming,

More information

Index COPYRIGHTED MATERIAL

Index COPYRIGHTED MATERIAL Index COPYRIGHTED MATERIAL Note to the Reader: Throughout this index boldfaced page numbers indicate primary discussions of a topic. Italicized page numbers indicate illustrations. A abstract classes

More information

Selected Java Topics

Selected Java Topics Selected Java Topics Introduction Basic Types, Objects and Pointers Modifiers Abstract Classes and Interfaces Exceptions and Runtime Exceptions Static Variables and Static Methods Type Safe Constants Swings

More information

SYLLABUS JAVA COURSE DETAILS. DURATION: 60 Hours. With Live Hands-on Sessions J P I N F O T E C H

SYLLABUS JAVA COURSE DETAILS. DURATION: 60 Hours. With Live Hands-on Sessions J P I N F O T E C H JAVA COURSE DETAILS DURATION: 60 Hours With Live Hands-on Sessions J P I N F O T E C H P U D U C H E R R Y O F F I C E : # 4 5, K a m a r a j S a l a i, T h a t t a n c h a v a d y, P u d u c h e r r y

More information

CS 231 Data Structures and Algorithms, Fall 2016

CS 231 Data Structures and Algorithms, Fall 2016 CS 231 Data Structures and Algorithms, Fall 2016 Dr. Bruce A. Maxwell Department of Computer Science Colby College Course Description Focuses on the common structures used to store data and the standard

More information

Course Outline. Introduction to java

Course Outline. Introduction to java Course Outline 1. Introduction to OO programming 2. Language Basics Syntax and Semantics 3. Algorithms, stepwise refinements. 4. Quiz/Assignment ( 5. Repetitions (for loops) 6. Writing simple classes 7.

More information

Java Primer 1: Types, Classes and Operators

Java Primer 1: Types, Classes and Operators Java Primer 1 3/18/14 Presentation for use with the textbook Data Structures and Algorithms in Java, 6th edition, by M. T. Goodrich, R. Tamassia, and M. H. Goldwasser, Wiley, 2014 Java Primer 1: Types,

More information

Contents. Figures. Tables. Examples. Foreword. Preface. 1 Basics of Java Programming 1. xix. xxi. xxiii. xxvii. xxix

Contents. Figures. Tables. Examples. Foreword. Preface. 1 Basics of Java Programming 1. xix. xxi. xxiii. xxvii. xxix PGJC4_JSE8_OCA.book Page ix Monday, June 20, 2016 2:31 PM Contents Figures Tables Examples Foreword Preface xix xxi xxiii xxvii xxix 1 Basics of Java Programming 1 1.1 Introduction 2 1.2 Classes 2 Declaring

More information

DOWNLOAD PDF CORE JAVA APTITUDE QUESTIONS AND ANSWERS

DOWNLOAD PDF CORE JAVA APTITUDE QUESTIONS AND ANSWERS Chapter 1 : Chapter-wise Java Multiple Choice Questions and Answers Interview MCQs Java Programming questions and answers with explanation for interview, competitive examination and entrance test. Fully

More information

Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub

Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub Lebanese University Faculty of Science Computer Science BS Degree Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub 2 Crash Course in JAVA Classes A Java

More information

Chapter 6 Introduction to Defining Classes

Chapter 6 Introduction to Defining Classes Introduction to Defining Classes Fundamentals of Java: AP Computer Science Essentials, 4th Edition 1 Objectives Design and implement a simple class from user requirements. Organize a program in terms of

More information

엄현상 (Eom, Hyeonsang) School of Computer Science and Engineering Seoul National University COPYRIGHTS 2017 EOM, HYEONSANG ALL RIGHTS RESERVED

엄현상 (Eom, Hyeonsang) School of Computer Science and Engineering Seoul National University COPYRIGHTS 2017 EOM, HYEONSANG ALL RIGHTS RESERVED 엄현상 (Eom, Hyeonsang) School of Computer Science and Engineering Seoul National University COPYRIGHTS 2017 EOM, HYEONSANG ALL RIGHTS RESERVED Outline - Questionnaire Results - Java Overview - Java Examples

More information

Core Java SYLLABUS COVERAGE SYLLABUS IN DETAILS

Core Java SYLLABUS COVERAGE SYLLABUS IN DETAILS Core Java SYLLABUS COVERAGE Introduction. OOPS Package Exception Handling. Multithreading Applet, AWT, Event Handling Using NetBean, Ecllipse. Input Output Streams, Serialization Networking Collection

More information

Advanced Java Programming

Advanced Java Programming Advanced Java Programming Length: 4 days Description: This course presents several advanced topics of the Java programming language, including Servlets, Object Serialization and Enterprise JavaBeans. In

More information

Course information. Petr Hnětynka 2/2 Zk/Z

Course information. Petr Hnětynka  2/2 Zk/Z JAVA Introduction Course information Petr Hnětynka hnetynka@d3s.mff.cuni.cz http://d3s.mff.cuni.cz/~hnetynka/java/ 2/2 Zk/Z exam written test zápočet practical test in the lab max 5 attempts zápočtový

More information

Pace University. Fundamental Concepts of CS121 1

Pace University. Fundamental Concepts of CS121 1 Pace University Fundamental Concepts of CS121 1 Dr. Lixin Tao http://csis.pace.edu/~lixin Computer Science Department Pace University October 12, 2005 This document complements my tutorial Introduction

More information

The Java programming environment. The Java programming environment. Java: A tiny intro. Java features

The Java programming environment. The Java programming environment. Java: A tiny intro. Java features The Java programming environment Cleaned up version of C++: no header files, macros, pointers and references, unions, structures, operator overloading, virtual base classes, templates, etc. Object-orientation:

More information

Java for Programmers Course (equivalent to SL 275) 36 Contact Hours

Java for Programmers Course (equivalent to SL 275) 36 Contact Hours Java for Programmers Course (equivalent to SL 275) 36 Contact Hours Course Overview This course teaches programmers the skills necessary to create Java programming system applications and satisfies the

More information

PIC 20A The Basics of Java

PIC 20A The Basics of Java PIC 20A The Basics of Java Ernest Ryu UCLA Mathematics Last edited: November 1, 2017 Outline Variables Control structures classes Compilation final and static modifiers Arrays Examples: String, Math, and

More information

Programming. Syntax and Semantics

Programming. Syntax and Semantics Programming For the next ten weeks you will learn basic programming principles There is much more to programming than knowing a programming language When programming you need to use a tool, in this case

More information

Programming II (CS300)

Programming II (CS300) 1 Programming II (CS300) Chapter 02: Using Objects MOUNA KACEM mouna@cs.wisc.edu Fall 2018 Using Objects 2 Introduction to Object Oriented Programming Paradigm Objects and References Memory Management

More information

CS506 Web Programming and Development Solved Subjective Questions With Reference For Final Term Lecture No 1

CS506 Web Programming and Development Solved Subjective Questions With Reference For Final Term Lecture No 1 P a g e 1 CS506 Web Programming and Development Solved Subjective Questions With Reference For Final Term Lecture No 1 Q1 Describe some Characteristics/Advantages of Java Language? (P#12, 13, 14) 1. Java

More information

Name of subject: JAVA PROGRAMMING Subject code: Semester: V ASSIGNMENT 1

Name of subject: JAVA PROGRAMMING Subject code: Semester: V ASSIGNMENT 1 Name of subject: JAVA PROGRAMMING Subject code: 17515 Semester: V ASSIGNMENT 1 3 Marks Introduction to Java (16 Marks) 1. Write all primitive data types available in java with their storage size in bytes.

More information

Java 8 Programming for OO Experienced Developers

Java 8 Programming for OO Experienced Developers www.peaklearningllc.com Java 8 Programming for OO Experienced Developers (5 Days) This course is geared for developers who have prior working knowledge of object-oriented programming languages such as

More information

SELF-STUDY. Glossary

SELF-STUDY. Glossary SELF-STUDY 231 Glossary HTML (Hyper Text Markup Language - the language used to code web pages) tags used to embed an applet. abstract A class or method that is incompletely defined,

More information

OOSD. Introduction to JAVA. Giuseppe Lipari Scuola Superiore Sant Anna Pisa. September 29, 2010

OOSD. Introduction to JAVA. Giuseppe Lipari   Scuola Superiore Sant Anna Pisa. September 29, 2010 OOSD Introduction to JAVA Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa September 29, 2010 G. Lipari (Scuola Superiore Sant Anna) OOSD September 29, 2010 1 / 55 Outline

More information

OOSD. Introduction to JAVA. Giuseppe Lipari Scuola Superiore Sant Anna Pisa. September 12, 2011

OOSD. Introduction to JAVA. Giuseppe Lipari  Scuola Superiore Sant Anna Pisa. September 12, 2011 OOSD Introduction to JAVA Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa September 12, 2011 G. Lipari (Scuola Superiore Sant Anna) OOSD September 12, 2011 1 / 55 Outline

More information

OBJECT ORIENTED PROGRAMMING TYm. Allotted : 3 Hours Full Marks: 70

OBJECT ORIENTED PROGRAMMING TYm. Allotted : 3 Hours Full Marks: 70 I,.. CI/. T.cH/C8E/ODD SEM/SEM-5/CS-504D/2016-17... AiIIIII "-AmI u...iir e~ IlAULAKA ABUL KALAM AZAD UNIVERSITY TECHNOLOGY,~TBENGAL Paper Code: CS-504D OF OBJECT ORIENTED PROGRAMMING TYm. Allotted : 3

More information

B.V. Patel Institute of BMC & IT, UTU 2014

B.V. Patel Institute of BMC & IT, UTU 2014 BCA 3 rd Semester 030010301 - Java Programming Unit-1(Java Platform and Programming Elements) Q-1 Answer the following question in short. [1 Mark each] 1. Who is known as creator of JAVA? 2. Why do we

More information

Outline. Introduction to Java. What Is Java? History. Java 2 Platform. Java 2 Platform Standard Edition. Introduction Java 2 Platform

Outline. Introduction to Java. What Is Java? History. Java 2 Platform. Java 2 Platform Standard Edition. Introduction Java 2 Platform Outline Introduction to Java Introduction Java 2 Platform CS 3300 Object-Oriented Concepts Introduction to Java 2 What Is Java? History Characteristics of Java History James Gosling at Sun Microsystems

More information

Objects and Classes. Basic OO Principles. Classes in Java. Mark Allen Weiss Copyright 2000

Objects and Classes. Basic OO Principles. Classes in Java. Mark Allen Weiss Copyright 2000 Objects and Classes Mark Allen Weiss Copyright 2000 8/30/00 1 Basic OO Principles Objects are entities that have structure and state. Each object defines operations that may access or manipulate that state.

More information

1 Epic Test Review 2 Epic Test Review 3 Epic Test Review 4. Epic Test Review 5 Epic Test Review 6 Epic Test Review 7 Epic Test Review 8

1 Epic Test Review 2 Epic Test Review 3 Epic Test Review 4. Epic Test Review 5 Epic Test Review 6 Epic Test Review 7 Epic Test Review 8 Epic Test Review 1 Epic Test Review 2 Epic Test Review 3 Epic Test Review 4 Write a line of code that outputs the phase Hello World to the console without creating a new line character. System.out.print(

More information

Advanced Object-Oriented Programming Introduction to OOP and Java

Advanced Object-Oriented Programming Introduction to OOP and Java Advanced Object-Oriented Programming Introduction to OOP and Java Dr. Kulwadee Somboonviwat International College, KMITL kskulwad@kmitl.ac.th Course Objectives Solidify object-oriented programming skills

More information

B2.52-R3: INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING THROUGH JAVA

B2.52-R3: INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING THROUGH JAVA B2.52-R3: INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING THROUGH JAVA NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. 2. PART ONE

More information

Course information. Petr Hnětynka 2/2 Zk/Z

Course information. Petr Hnětynka  2/2 Zk/Z JAVA Introduction Course information Petr Hnětynka hnetynka@d3s.mff.cuni.cz http://d3s.mff.cuni.cz/~hnetynka/java/ 2/2 Zk/Z exam written test zápočet practical test in the lab zápočtový program "reasonable"

More information

Program Fundamentals

Program Fundamentals Program Fundamentals /* HelloWorld.java * The classic Hello, world! program */ class HelloWorld { public static void main (String[ ] args) { System.out.println( Hello, world! ); } } /* HelloWorld.java

More information

About this exam review

About this exam review Final Exam Review About this exam review I ve prepared an outline of the material covered in class May not be totally complete! Exam may ask about things that were covered in class but not in this review

More information

JAVA: A Primer. By: Amrita Rajagopal

JAVA: A Primer. By: Amrita Rajagopal JAVA: A Primer By: Amrita Rajagopal 1 Some facts about JAVA JAVA is an Object Oriented Programming language (OOP) Everything in Java is an object application-- a Java program that executes independently

More information

CS321 Languages and Compiler Design I. Winter 2012 Lecture 2

CS321 Languages and Compiler Design I. Winter 2012 Lecture 2 CS321 Languages and Compiler Design I Winter 2012 Lecture 2 1 A (RE-)INTRODUCTION TO JAVA FOR C++/C PROGRAMMERS Why Java? Developed by Sun Microsystems (now Oracle) beginning in 1995. Conceived as a better,

More information

Brief Summary of Java

Brief Summary of Java Brief Summary of Java Java programs are compiled into an intermediate format, known as bytecode, and then run through an interpreter that executes in a Java Virtual Machine (JVM). The basic syntax of Java

More information

Object Oriented Programming is a programming method that combines: Advantage of Object Oriented Programming

Object Oriented Programming is a programming method that combines: Advantage of Object Oriented Programming Overview of OOP Object Oriented Programming is a programming method that combines: a) Data b) Instructions for processing that data into a self-sufficient object that can be used within a program or in

More information

Contents. I. Classes, Superclasses, and Subclasses. Topic 04 - Inheritance

Contents. I. Classes, Superclasses, and Subclasses. Topic 04 - Inheritance Contents Topic 04 - Inheritance I. Classes, Superclasses, and Subclasses - Inheritance Hierarchies Controlling Access to Members (public, no modifier, private, protected) Calling constructors of superclass

More information

PESIT Bangalore South Campus

PESIT Bangalore South Campus PESIT Bangalore South Campus 15CS45 : OBJECT ORIENTED CONCEPTS Faculty : Prof. Sajeevan K, Prof. Hanumanth Pujar Course Description: No of Sessions: 56 This course introduces computer programming using

More information

Zhifu Pei CSCI5448 Spring 2011 Prof. Kenneth M. Anderson

Zhifu Pei CSCI5448 Spring 2011 Prof. Kenneth M. Anderson Zhifu Pei CSCI5448 Spring 2011 Prof. Kenneth M. Anderson Introduction History, Characteristics of Java language Java Language Basics Data types, Variables, Operators and Expressions Anatomy of a Java Program

More information

Java TM Introduction. Renaud Florquin Isabelle Leclercq. FloConsult SPRL.

Java TM Introduction. Renaud Florquin Isabelle Leclercq. FloConsult SPRL. Java TM Introduction Renaud Florquin Isabelle Leclercq FloConsult SPRL http://www.floconsult.be mailto:info@floconsult.be Java Technical Virtues Write once, run anywhere Get started quickly Write less

More information

20 Most Important Java Programming Interview Questions. Powered by

20 Most Important Java Programming Interview Questions. Powered by 20 Most Important Java Programming Interview Questions Powered by 1. What's the difference between an interface and an abstract class? An abstract class is a class that is only partially implemented by

More information

STRUCTURING OF PROGRAM

STRUCTURING OF PROGRAM Unit III MULTIPLE CHOICE QUESTIONS 1. Which of the following is the functionality of Data Abstraction? (a) Reduce Complexity (c) Parallelism Unit III 3.1 (b) Binds together code and data (d) None of the

More information

Chapter 1 Introduction to Java

Chapter 1 Introduction to Java What is Java? Chapter 1 Introduction to Java Java is a high-level programming language originally developed by Sun Microsystems and released in 1995. Java runs on a variety of platforms, such as Windows,

More information

Software Development & Education Center. Java Platform, Standard Edition 7 (JSE 7)

Software Development & Education Center. Java Platform, Standard Edition 7 (JSE 7) Software Development & Education Center Java Platform, Standard Edition 7 (JSE 7) Detailed Curriculum Getting Started What Is the Java Technology? Primary Goals of the Java Technology The Java Virtual

More information

VALLIAMMAI ENGINEERING COLLEGE

VALLIAMMAI ENGINEERING COLLEGE VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur 603 203 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK B.E. - Electrical and Electronics Engineering IV SEMESTER CS6456 - OBJECT ORIENTED

More information

Methods (Deitel chapter 6)

Methods (Deitel chapter 6) Methods (Deitel chapter 6) 1 Plan 2 Introduction Program Modules in Java Math-Class Methods Method Declarations Argument Promotion Java API Packages Random-Number Generation Scope of Declarations Methods

More information

Programming overview

Programming overview Programming overview Basic Java A Java program consists of: One or more classes A class contains one or more methods A method contains program statements Each class in a separate file MyClass defined in

More information

Lecture 1: Overview of Java

Lecture 1: Overview of Java Lecture 1: Overview of Java What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++ Designed for easy Web/Internet applications Widespread

More information

CS 251 Intermediate Programming Methods and Classes

CS 251 Intermediate Programming Methods and Classes CS 251 Intermediate Programming Methods and Classes Brooke Chenoweth University of New Mexico Fall 2018 Methods An operation that can be performed on an object Has return type and parameters Method with

More information

CS 251 Intermediate Programming Methods and More

CS 251 Intermediate Programming Methods and More CS 251 Intermediate Programming Methods and More Brooke Chenoweth University of New Mexico Spring 2018 Methods An operation that can be performed on an object Has return type and parameters Method with

More information

Chapter 1 INTRODUCTION SYS-ED/ COMPUTER EDUCATION TECHNIQUES, INC.

Chapter 1 INTRODUCTION SYS-ED/ COMPUTER EDUCATION TECHNIQUES, INC. hapter 1 INTRODUTION SYS-ED/ OMPUTER EDUATION TEHNIQUES, IN. Objectives You will learn: Java features. Java and its associated components. Features of a Java application and applet. Java data types. Java

More information

Games Course, summer Introduction to Java. Frédéric Haziza

Games Course, summer Introduction to Java. Frédéric Haziza Games Course, summer 2005 Introduction to Java Frédéric Haziza (daz@it.uu.se) Summer 2005 1 Outline Where to get Java Compilation Notions of Type First Program Java Syntax Scope Class example Classpath

More information

Class, Variable, Constructor, Object, Method Questions

Class, Variable, Constructor, Object, Method Questions Class, Variable, Constructor, Object, Method Questions http://www.wideskills.com/java-interview-questions/java-classes-andobjects-interview-questions https://www.careerride.com/java-objects-classes-methods.aspx

More information

The Java Programming Language

The Java Programming Language The Java Programming Language Slide by John Mitchell (http://www.stanford.edu/class/cs242/slides/) Outline Language Overview History and design goals Classes and Inheritance Object features Encapsulation

More information

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS PAUL L. BAILEY Abstract. This documents amalgamates various descriptions found on the internet, mostly from Oracle or Wikipedia. Very little of this

More information

Seminar report Java Submitted in partial fulfillment of the requirement for the award of degree Of CSE

Seminar report Java Submitted in partial fulfillment of the requirement for the award of degree Of CSE A Seminar report On Java Submitted in partial fulfillment of the requirement for the award of degree Of CSE SUBMITTED TO: www.studymafia.org SUBMITTED BY: www.studymafia.org 1 Acknowledgement I would like

More information

B2.52-R3: INTRODUCTION TO OBJECT ORIENTATED PROGRAMMING THROUGH JAVA

B2.52-R3: INTRODUCTION TO OBJECT ORIENTATED PROGRAMMING THROUGH JAVA B2.52-R3: INTRODUCTION TO OBJECT ORIENTATED PROGRAMMING THROUGH JAVA NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. 2. PART ONE

More information

Java How to Program, 10/e. Copyright by Pearson Education, Inc. All Rights Reserved.

Java How to Program, 10/e. Copyright by Pearson Education, Inc. All Rights Reserved. Java How to Program, 10/e Education, Inc. All Rights Reserved. Each class you create becomes a new type that can be used to declare variables and create objects. You can declare new classes as needed;

More information

Java. Classes 3/3/2014. Summary: Chapters 1 to 10. Java (2)

Java. Classes 3/3/2014. Summary: Chapters 1 to 10. Java (2) Summary: Chapters 1 to 10 Sharma Chakravarthy Information Technology Laboratory (IT Lab) Computer Science and Engineering Department The University of Texas at Arlington, Arlington, TX 76019 Email: sharma@cse.uta.edu

More information

12/22/11. Java How to Program, 9/e. public must be stored in a file that has the same name as the class and ends with the.java file-name extension.

12/22/11. Java How to Program, 9/e. public must be stored in a file that has the same name as the class and ends with the.java file-name extension. Java How to Program, 9/e Education, Inc. All Rights Reserved. } Covered in this chapter Classes Objects Methods Parameters double primitive type } Create a new class (GradeBook) } Use it to create an object.

More information

Chapter 1 GETTING STARTED. SYS-ED/ Computer Education Techniques, Inc.

Chapter 1 GETTING STARTED. SYS-ED/ Computer Education Techniques, Inc. Chapter 1 GETTING STARTED SYS-ED/ Computer Education Techniques, Inc. Objectives You will learn: Java platform. Applets and applications. Java programming language: facilities and foundation. Memory management

More information

Introduction. Overview of the Course on Java. Overview of Part 1 of the Course

Introduction. Overview of the Course on Java. Overview of Part 1 of the Course Introduction Michael B. Spring Department of Information Science and Telecommunications University of Pittsburgh spring@imap.pitt.edu http://www.sis.pitt.edu /~spring Overview of the Course on Java Part

More information

Goals. Java - An Introduction. Java is Compiled and Interpreted. Architecture Neutral & Portable. Compiled Languages. Introduction to Java

Goals. Java - An Introduction. Java is Compiled and Interpreted. Architecture Neutral & Portable. Compiled Languages. Introduction to Java Goals Understand the basics of Java. Introduction to Java Write simple Java Programs. 1 2 Java - An Introduction Java is Compiled and Interpreted Java - The programming language from Sun Microsystems Programmer

More information

(800) Toll Free (804) Fax Introduction to Java and Enterprise Java using Eclipse IDE Duration: 5 days

(800) Toll Free (804) Fax   Introduction to Java and Enterprise Java using Eclipse IDE Duration: 5 days Course Description This course introduces the Java programming language and how to develop Java applications using Eclipse 3.0. Students learn the syntax of the Java programming language, object-oriented

More information

Core Java Syllabus. Overview

Core Java Syllabus. Overview Core Java Syllabus Overview Java programming language was originally developed by Sun Microsystems which was initiated by James Gosling and released in 1995 as core component of Sun Microsystems' Java

More information

Java Notes. J Pickering Department of Computer Science The University of York Heslington York YO10 5DD UK

Java Notes. J Pickering Department of Computer Science The University of York Heslington York YO10 5DD UK Java Notes J Pickering Department of Computer Science The University of York Heslington York YO10 5DD UK September 13, 2007 The author gratefully acknowledges the assistance of Ian Toyn, Department of

More information

CSE P 501 Compilers. Java Implementation JVMs, JITs &c Hal Perkins Winter /11/ Hal Perkins & UW CSE V-1

CSE P 501 Compilers. Java Implementation JVMs, JITs &c Hal Perkins Winter /11/ Hal Perkins & UW CSE V-1 CSE P 501 Compilers Java Implementation JVMs, JITs &c Hal Perkins Winter 2008 3/11/2008 2002-08 Hal Perkins & UW CSE V-1 Agenda Java virtual machine architecture.class files Class loading Execution engines

More information

Objective Questions. BCA Part III Paper XIX (Java Programming) page 1 of 5

Objective Questions. BCA Part III Paper XIX (Java Programming) page 1 of 5 Objective Questions BCA Part III page 1 of 5 1. Java is purely object oriented and provides - a. Abstraction, inheritance b. Encapsulation, polymorphism c. Abstraction, polymorphism d. All of the above

More information

Methods (Deitel chapter 6)

Methods (Deitel chapter 6) 1 Plan 2 Methods (Deitel chapter ) Introduction Program Modules in Java Math-Class Methods Method Declarations Argument Promotion Java API Packages Random-Number Generation Scope of Declarations Methods

More information

Introduction... xv SECTION 1: DEVELOPING DESKTOP APPLICATIONS USING JAVA Chapter 1: Getting Started with Java... 1

Introduction... xv SECTION 1: DEVELOPING DESKTOP APPLICATIONS USING JAVA Chapter 1: Getting Started with Java... 1 Introduction... xv SECTION 1: DEVELOPING DESKTOP APPLICATIONS USING JAVA Chapter 1: Getting Started with Java... 1 Introducing Object Oriented Programming... 2 Explaining OOP concepts... 2 Objects...3

More information

Java Foundations Certified Junior Associate

Java Foundations Certified Junior Associate Java Foundations Certified Junior Associate 习题 1. When the program runs normally (when not in debug mode), which statement is true about breakpoints? Breakpoints will stop program execution at the last

More information

Special Topics: Programming Languages

Special Topics: Programming Languages Lecture #23 0 V22.0490.001 Special Topics: Programming Languages B. Mishra New York University. Lecture # 23 Lecture #23 1 Slide 1 Java: History Spring 1990 April 1991: Naughton, Gosling and Sheridan (

More information