Java

 Java Essay

Java Language Coding

Basic Encoding Elements

Tiberiu Leţia: Computer software Engineering –Java Programming Terminology – Development Basic Factors

1

Articles 1 . Stand alone applications and mini-applications 2 . Name and identifiers several. Java plan structure 4. Data types 5. Providers 6. Stream execution control

Tiberiu Leţia: Software Engineering –Java Coding Language – Programming Simple Elements

2

1 . Stand alone applications and mini-applications

Mini- applications sama dengan applets standalone application) = program that can be used independently. They may have main() approach public stationary void primary (String[] args)

launching the execution (run program) Java interpreter  java numeProgram

Tiberiu Leţia: Software Architectural –Java Development Language – Programming Fundamental Elements

a few

Applet A Java program that stretches Applet category. This school doesn't include main method the program may not be launched employing Java interpreter. They are utilized in Web pages (via HTML file). Web hardware browser (ex. Internet Explorer, Mozilla Firefox).

Tiberiu Leţia: Software program Engineering –Java Programming Vocabulary – Coding Basic Components

4

installment payments on your Names and Identifiers

An identifier is a sequence of unlimited duration of letters and digits where first is compulsory a letter. They are really string of characters symbolizing names given to variable, classes or strategies. They should differ from keywords (including null, bogus and true). Names are used for referring choices like plans, class types, interfaces, type members, parameters, local factors etc . The names can be:  simple -- ex.: xxx  made up – sequences of verifications separated by ". ". ex.: xxx. yyy. zzz Tiberiu Leţia: Software Anatomist –Java Encoding Language – Programming Fundamental Elements your five

abstract do import general public try boolean double instanceof return void break else int brief volatile byte extends interface static while case final long super catch finally native move char float new synchronized class pertaining to null this const goto package toss continue in the event private includes default implements protected transient Keywords Tiberiu Leţia: Software program Engineering –Java Programming Terminology – Encoding Basic Elements 6

Ex.: java. awt. BorderLayout java. lang. Program. out. println()

Tiberiu Leţia: Software Engineering –Java Coding Language – Programming Fundamental Elements

several

3. Java Program Framework

Lexical choices:  comments –  keywords  identifiers  literals  separators – signs ( , , [, ],;,. and, ) used to separate lexical entities  employees Variables Constants Expressions Tiberiu Leţia: Software Engineering –Java Programming Language – Coding Basic Elements 8

Instructions – lexical units that describe the actual program must perform – the instructions are separated by ”; ”. Code block instructions; . packages subpackages

Tiberiu Leţia: Software Anatomist –Java Coding Language – Programming Simple Elements

being unfaithful

Source files Code origin  filename. java Compiler javac  filename. course Package statement: package NumePachet;

Tiberiu Leţia: Software Anatomist –Java Coding Language – Programming Basic Elements

15

Program model:

/** System name 5. Comments */ public course NumeClasaPrincipala /** * Metoda principala a aplicatiei * * Se pot transmite parametrii prin tabelul argumente */ public static void main (String[] args) // Aici se adauga codul programului System.out.println("Salut! Merge programul!"); //terminare metoda main

de

Tiberiu Leţia: Application Engineering –Java Programming Language – Encoding Basic Elements

11

System  javac Running java NumeClasaprincipala

Tiberiu Leţia: Computer software Engineering –Java Programming Dialect – Development Basic Factors

12

4. Data Types

Type variabileName; Variable types in Java:  reference point - classes, interfaces, arrays (or null) and  primitive info. Where could they be used?

Tiberiu Leţia: Computer software Engineering –Java...

Popular