Textbooks: - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

Textbooks:

Description:

platform independent. Java applets are executable on internet ... What makes Java platform independent? ... Each platform (computer) has its own 'Java virtual ... – PowerPoint PPT presentation

Number of Views:51
Avg rating:3.0/5.0
Slides: 12
Provided by: elliotk
Category:

less

Transcript and Presenter's Notes

Title: Textbooks:


1
(No Transcript)
2
Textbooks
  • Problem Solving with Java, 1999, Addison-Wesley,
    Koffman and Wolz (for coverage of Java language).
  • Data Structures and Algorithms in Java, 1998,
    LaFore

3
(No Transcript)
4
Main Java Features
  • Class definitions are much simpler.
  • Unlike C, Java is a totally object-oriented
    language
  • Main function must be in a class.
  • No reference arguments all call by value
  • No pointers

5
Main Java Features (contd)
  • Java is internet friendly
  • platform independent
  • Java applets are executable on internet
  • Java has applications too similar to C
    programs

6
What makes Java platform independent?
  • Compiler translates to byte code (machine
    independent) instead of machine language (machine
    dependent).
  • Each platform (computer) has its own Java
    virtual machine which can interpret byte code
    and translate it to machine language.

7
What makes Java platform independent (contd)?
  • Byte code is like an intermediate language
    between source code (Java) and object code
    (machine language).
  • The Java virtual machine is an interpreter which
    means that Java runs slower than a compiled
    language.

8
Java syntax based on C
  • Identifiers same as for C - Programmers use
    Hungarian notation
  • myBankAccount instead of my_bank_account for
    identifiers
  • MyClass for a class (class name begins with
    uppercase)
  • Primitive Data Types int, float, double, boolean
    (not bool), char
  • String class part of Java class library similar
    to C string class.

9
Control structure syntax same as for C
  • Loops (while, do-while, for)
  • Decisions - if and switch
  • functions (methods) - no var parameters

10
(No Transcript)
11
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com