Html5

Páginas: 12 (2809 palabras) Publicado: 5 de abril de 2012
Teach Yourself Java in 21 Minutes
Department of Computer Science, Lund Institute of Technology
Author: Patrik Persson
Contact: klas@cs.lth.se
This is a brief tutorial in Java for you who already know
another object-oriented language, such as Simula or C++.
The tutorial is organized as a number of examples showing
the details of Java. The intention is to give you enough
informationabout the Java language to be able to follow the
course in real-time programming.
There are books claiming to teach you Java in 21 days, but
since you already know object-orientation your learning
time will probably be closer to 21 minutes – hence the title.
This document may be freely copied and distributed for non-commercial use. In case of
changes or enhancements, title,department, author, and contact must be preserved, and
changes that are redistributed or made public must be mailed to the contact above.

Table of contents
1

Simple declarations and expressions .......................................................................3
1.1
1.2
1.3

2

Statements................................................................................................................4
2.1
2.2

3

Catching exceptions ...........................................................................................................11
Throwing exceptions..........................................................................................................12
Declaring new exceptions..................................................................................................12
Unchecked exceptions........................................................................................................13

Miscellaneous ........................................................................................................13
5.1
5.2
5.3
5.4

6Classes..................................................................................................................................7
Methods................................................................................................................................7
Using objects........................................................................................................................8
Parameters to classes: constructors......................................................................................8
The main method .................................................................................................................9
Inheritance............................................................................................................................9
Interfaces andlisteners.......................................................................................................10

Exceptions..............................................................................................................11
4.1
4.2
4.3
4.4

5

If statements and boolean expressions .................................................................................5
While and for statements.....................................................................................................6

Classes and objects ..................................................................................................6
3.1
3.2
3.3
3.4
3.5
3.6
3.7

4

Simple declarations..............................................................................................................3
Numericexpressions and assignments.................................................................................3
Type conversion (casting) ....................................................................................................4

Comments ..........................................................................................................................13
Using packages...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • que es HTML5
  • html5
  • Html5
  • HTML5
  • html5
  • Html5
  • Html5
  • Html5

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS