May 27, 2009 - The Java Virtual Machine interpreter. ⢠Performance: a bit ... the Java language provides an extensive
Java programs are portable across operating systems and hardware
environments. Portability is to .... default behavior. The basic structure of an
applet that uses each of these predefined methods is: ... free up system resources
, stop threads.
internationalization and the areas for which the Java platform provides support.
.... Note that JDK 1.4 now provides support for Thai and Hindi encodings.
Introduction to Object-Oriented Programming with Java--Wu. Chapter 2 - 1. Image
... Identify the basic components of Java programs. Distinguish two types of ...
Techniques of Java Programming: Java Basics. Manuel Oriol. April 18, 2006. 1
Introduction. Java is the Object-Oriented language of choice for most developers.
on fundamental language concepts and the foundations of modern user interface programming. Youââ¬â¢ll find in- depth
object-oriented programming to generics, ... objects for later retrieval. Master concurrent programming ... output, XML,
Download Best Book Core Java Volume I--Fundamentals (10th Edition) (Core Series), PDF Download Core Java Volume I--Funda
Online PDF 1: Core Java Volume I--Fundamentals, Read PDF 1: Core Java Volume I--Fundamentals, Full PDF 1: Core Java Volu
... in PDF Format also available for mobile readerGoogle Book Official Core Java ... Java language and library. ... two-
encapsulation, classes, and inheritance work in Java * Master interfaces, inner classes, and lambda expressions for func
1.4 Floats 1.5 Chars and Strings 1.6 Dates and Times
1.1 Output Methods
System.out is the "standard" java output stream
This stream is already open and ready to accept output data. Print an object System.out.print(Object object);
Print an object using a specific format System.out.printf(String format, Object object); Print an object and a new line System.out.println(Object object);
Java Basics
System.out is the "standard" java output stream
System.out.print(); Print without moving cursor to the next line
System.out.println(); Print moving cursor to the next line
Java Basics
System.out is the "standard" java output stream
Java Basics
System.out is the "standard" java output stream System.out.printf(); Print without moving cursor to the next line
Java Basics
1.2 Escape Sequences
Java Basics
Escape sequences
Java Basics
Escape sequences: new line and tab examples
Java Basics
Escape sequences: slash and double quote examples
Java Basics
1.3 Integers
Java Basics
Printing formats: Numbers with zeros
This is the format
Java Basics
Printing Integers Numbers
Printing Integers Numbers
Java Basics
1.4 Floats
Java Basics
Printing formats: Floats
This is the format Java Basics
Printing Floating-Point Numbers
Java Basics
Printing Floating-Point Numbers
Java Basics
1.5 Chars and Strings
Java Basics
Printing formats: Letters
This is the format
Java Basics
Printing Strings and characters
Java Basics
Printing Strings and characters
Java Basics
1.6 Dates and Times
Java Basics
Printing Dates and times
Java Basics
Printing Dates and times
Java Basics
Printing formats: Dates Remember to import the Date Class
This is the format
Java Basics
Printing formats resources
See more formats on http://www.java2s.com/Code/JavaAPI/java.lang/Sy stem.out.printf.htm
Java Basics
2. Input in Java
Java Basics
System.in is used to read user inputs
System.in and Scanner class allow us to read values typed by the user
First we need to import the Scanner class at the beginning of our source code file
Java Basics
System.in: reading strings example
Creating the scanner
Reading an integer
Java Basics
System.in: reading strings example
Creating the scanner
Reading a String
Java Basics
System.in: reading posibilities
Java Basics
3. Casting Primitive Types Casting
Java Primitive Types
Basic programming review
Primitive Types Casting
Assignation variable
Value to assign
int
long
float
double
char
byte
short
boolean
int
-
A
A
A
C
C
C
N
long
C
-
A
A
C
C
C
N
float
C
C
-
A
C
C
C
N
double
C
C
C
-
C
C
C
N
char
A
A
A
A
-
C
C
N
byte
A
A
A
A
C
-
A
N
short
A
A
A
A
C
C
-
N
boolean
N
N
N
N
N
N
N
-
C = Explicit Cast Required
A = Automatic Cast
Casting example
Java Basics
ASCII table
Java Basics
References
• [Barker] J. Barker, Beginning Java Objects: From Concepts To Code, Second Edition, Apress, 2005. • [Deitel] H.M. Deitel and P.J. Deitel, Java How to Program: Early Objects Version, Prentice Hall, 2009. • [Sierra] K. Sierra and B. Bates, Head First Java, 2nd Edition, O'Reilly Media, 2005. • Code Conventions for the Java Programming Language, available at http://java.sun.com/docs/codeconv/CodeConventions.pdf