











Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The first lecture of a java programming course offered at the university of greenwich. It covers the basics of java, including its benefits, different editions, and the concept of bytecode. The lecture also includes a simple 'hello world' program and an explanation of packages, imports, and defining classes in java.
Typology: Study notes
1 / 19
This page cannot be seen from the preview
Don't miss anything!












1 Application Development for Mobile Devices
Java's big benefit - Write Once, Run Anywhere Physical Machine Java Platform Java source code Myprog.java Java bytecode Myprog.class compile using Java compiler Java source code is compiled to Java bytecode Java bytecode can be executed by a Java interpreter on any machine with an implementation of the Java Platform
Java Standard Edition versions Java 1.0 - 1995 Java 1.1 - 1997 Java 1.2 - 1998 Java 1.3 - 2000 Java 1.4 - 2002 still widely used basis of the Java used in Java ME what we're covering here Java 5.0 - 2004 powerful new features not implemented for mobile devices Java 6.0 – 2006 smaller change than version 5
Java API documentation packages classes in selected package details of the selected class
Hello World application /*
Comments // to end of line /* */ - everything between
*** HelloWorld.java /* package jqs; import java.util.Date; public class HelloWorld { public static void main(String[] args) { System.out.println("Hello world"); Date now = new Date(); // get the system date System.out.println("The date and time are: " + now.toString()); } }
import
defining classes in Java
System.out.println()
declaring a variable
calling a method
Sources of Further information The Java tutorial on the Sun website http://java.sun.com/docs/books/tutorial/ Java API documentation http://java.sun.com/j2se/1.4.2/docs/api/index.html