1. Program Structure In Java

1y ago
9 Views
2 Downloads
2.06 MB
27 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Joao Adcock
Transcription

1. Program Structure in Java 1.1 Java Program Basic Elements 1.2 Example of a Java Program 1.3 Java Program Structure1 / 541.1.1 IdentifiersJava-letterJava-letterJava-digit Used for representation of different program structuresJava-letter is character for which method Character.isJavaLetterreturns trueJava-digit is character for which method Character.isJavaLetterreturnst false, but method Character.isJavaLetterOrDigitreturns trueJava is case-sensitive language, there is no length-limit for identifiers2 / 541

1.1.1 Identifiers - examplesCorrectWrongjava languageelement 1 (whitespace)numberSump*218(*)SUMclass(reserved word)element22elem(begins with digit)p2183 / 541.2 Example of a Java Program (1/3)Steps for solving a problem using a computer :– Complete understanding of the problem– Distinguishing objects and their characteristics, and constructionof the abstract model for the given problem– Forming of the abstract model– Realization of the abstract model, using some programminglanguage– Input the program code in one or more files using some editor– Compilation– Executing and testing4 / 542

1.2 Example of a Java Program (2/3) Problem: Computing year inflation factor during the10 year period for year inflation rates of 7% i 8%. Global algorithm :– values initialisation;header creation,– repeating (until max year is reached):take next year;compute the factors;print computed values;5 / 541.2 Example of a Java Program (3/3)class Inflation{public static void main(String[] args) {Year:int year 0;float factor7 1.0f;float factor8 1.0f;System.out.println(“Year:\t7%\t8%");do {year ;Results:// year year factor7 factor7 * 1.07f;factor8 factor8 * );System.out.print( (float)((int)(factor7 * 1000.0f)) / 1000.0f )((int)(factor8 * 1000.0f)) / 1000.0f );} while (year 10);}}6 / 543

2. Primitive Data Types 2.1 Importance of Data Types 2.2 Boolean Data Type 2.3 Integer Data Types 2.4 Real Data Types 2.5 Operators on Primitive Data Types 7 / 542.3 Integer Data Types- examplesCorrect integer expressionsWrong integer expressions19 3(int)true0x33 033 33099 1//bad octal num12L 45 / 2 % 3(char) ('a' 1)Classes Byte,Integer and MathSystem.out.println(Byte.MAX VALUE);int i sin( Math.PI / 2 ));8 / 544

2.4 Real Data Types (1/2)Values from set of rational numbers– Float – single precision (4 bytes)– Double – double precision (8 bytes)real constant structure: mantissa, exponent and type mark 9 / 542.5.2 Operators (1/7) Relational operators equal! unequal less less or equal greater greater or equalExamplesx 4letter ! 'd'45 lengthx y10 / 545

2.5.2 Operators (2/7) Arithmetical operators */% unary plusunary minusmultiplicationdivisionmoduloaddition- subtractionExamples- a 2 * ( b % 3)5 / b / 3 - 1.0int a 10;System.out.println(System.out.println(int b 10;System.out.println(System.out.println( a );a );b );b ); prefix or postfix addition operator-- prefix or postfix subtraction operator11 / 542.5.2 Operators (3/7) Bitwise operators shift left shift right with sign bit shift right with zero fillExamplesbyte b1 9;// eight binarySystem.out.println(1 3);System.out.println(-1 3);System.out.println(17 3);System.out.println(-17 3);System.out.println(17 3);System.out.println(-17 3);System.out.println(1 35);digits: 00001001// Prints 8// Prints -8// Prints 2// Prints -3// Prints 2// Prints 536870909// Prints 812 / 546

2.5.2 Operators (4/7) Logical (boolean and bitwise) operators bitwise complement! logical complement& logical AND or bitwise AND logical OR or bitwise OR logical XOR or bitwise XOR&& conditional AND i conditional ORExamples (bitwise operations)System.out.println( 7);System.out.println(7 & 9);System.out.println(7 9);System.out.println(7 9);////////printsprintsprintsprints-81151413 / 542.5.2 Operators (5/7) Special operators? :conditional operator(typeName) explicit type conversion – unary cast operator string concatenationExamplesSystem.out.println( (2 3) ? 5 : 6 );System.out.println( false ? 'a' : 'b' );// prints 5// prints bint i;i (int)3.14; // conversion from double to intSystem.out.println(i); // prints 3System.out.println("Novi " "Sad"); // prints: Novi Sad14 / 547

2.5.2 Operators (6/7) Assignment operators simple assignment arithmetic compound assignment operators:* , / , % , , - shift compound assignment operators: , , boolean logical compound assignment operators:& , , 15 / 542.5.2 Operators (7/7) Other operatorsInstanceof. (period)[] (brackets) – array element accessnew (class instance creation) Operators priority is changed by using parenthesis ( )16 / 548

2.5.2 Operators - priorityOperatorComment. [] newThe highest priority operators-- Postfix operators(typeName) ! -- -Unary operators. Prefix operators* / %Multiplication, division, modulo -Addition, concatenation subtraction Shifting (bitwise) instanceofRelational operators ! Equality checking&AND XOR OR&&Conditional AND Conditional OR? :Conditional operator * / % - & Assignment operators – lowest priority17 / 543. Statements 3.1 Block 3.2 Empty Statement 3.3 Expression Statement 3.4 Conditional Statements 3.5 Iteration Statements 3.6 Labelled Statement 3.7 break Statement 3.8 continue Statement 3.9 return Statement18 / 549

3.1.1 Local Variable Declaration In Java, all variables must be declared before usageLocal variable is declared inside a block,finalTypeVariableDeclaration ionIdArrayInitializerVariableInitializer19 / 543.1.1 Declarations - examplesBasic Type Local Variable Declarationint i 29;int j, k;double d2 i * 2.2;final char c1, c2 'a' ;boolean logic false;Dynamic initialisationclass TriangleHypotenusis {public static void main (String args []){double a 3.0, b 4.0; // const initdouble c Math.sqrt(a*a b*b); // dynamic initSystem.out.println("Hypotenusis: " c);}}20 / 5410

3.4.3 switch Statement (1/2) Multiple alternativesIt is commonly used with break el21 / 543.4.3 switch Statement (2/2) Value of switch statement condition must be one of the basic typeschar, byte, short or int Allowed operators for creating constant expressions:– explicit conversions in type String or in other basic type– unary operators , -, , !– binary operators *, /, %, , -, , , , , , , , , ! , &, , , && , – ternary operator ? : break statement immediately terminates switch statement – it isused to prevent executing of all alternatives (from exact switch labelto the end of the switch block switch statement is much more efficient than nested sequence of ifstatements22 / 5411

3.4.3 switch Statement- exampleExample: switch and if statement comparationswitch ( mark ) {case 5 :if (ocena ntln("Excellent");break;case 4 :else if (ocena 4)System.out.println(“Very good");System.out.println("Very good");break;case 3 :else if (ocena "Good");break;case 2 :else if (ocena 3 / 543.5.3 for Statement (1/2) for statement has four important parts:––––initialisation part (ForBegin)condition (Expr)iteration ending part (ForStep)body – repeating statement(s) stForStep,StatExpressionExprStatementList24 / 5412

3.5.3 for Statement (2/2) Initialisation part – declared local variable is visible only insidefor statement block Condition – logical expression – exits the loop for false value Iteration ending part – statement-expression list, executedsequently All three parts are optional, any of them can be missedImmediately loop termination – break, continue, return Ekvivalent for statementsfor( int i 0; i 10; i ) a[i] 0;-------------int i 0;.for( ; i 10; i ) a[i] 0;-------------for( int i 0; i 10; ) {a[i] 0; i ;};25 / 543.5.3 for Statement - examplesExample : printing numbers from 1 to 100 – three versionsclass program {public static void main(String[] args) {for( int number 1; number 100; System.out.println( broj --------------------------------class program {public static void main(String[] args) {for( int number 1; number 100; System.out.println( number ), number -------------------------------class program {public static void main(String[] args) {for( int number 1; number 100; System.out.println( number ));}}26 / 5413

3.7 break Statement Jump statement with triple functionality:– terminating switch statement– terminating iteration statements– “cosmetic” version of goto statement break statement without label switches control behind first(innermost) for, while, do or switch statement where it islocatedbreak statement with label doesn’t have to be located in for,while, do or switch statement block – flow control isswitched behind specified labelled statementidentificatorbreak;27 / 543.7 break Statement– examples (1/2)break statement with labelSystem.out.println(“begining");calculation : {if ( userAbort() ){break calculation;}dataInput();if ( userAbort() ){break .println(“end");28 / 5414

3.7 break Statement– examples (2/2)break statement without labelpublic static void main( String [] args){if ( args.length ! 2 ){System.out.println(“TWO argumets, please!!!");System.exit(1);}char wantedLetter args[1].charAt(0);boolean found false;for (int i 0; i args[0].length(); i ){if (wantedLetter args[0].charAt(i) ){found true;break;}}System.out.println(" Wanted letter " ( found ? “is" : “is not" ) " found.");}29 / 549. Prozori i apleti 9.1 Klasa JFrame 9.2 Klasa JApplet 9.3 Pokretanje apleta 9.4 Crtanje 9.5 Uvod u interaktivne interfejse 9.6 Raspoređivanje komponenti 9.7 Model događaja 9.8 Pregled Swing komponenti 9.9 Animacije30 / 5415

9.2 Klasa JApplet - primerPrimer – kreiranje apletaimport javax.swing.*;import java.awt.*;public class MyApplet extends JApplet {public void init() {getContentPane().add(new JLabel("Aplet!"));}} Dodavanje komponenti se obavlja u redefinisanom metoduinit, pozivanjem metoda add, ali je prethodno potrebnodobiti referencu na objekat sadržajnog okna Apleti ne moraju da imaju implementiran metod main, većse kreiranje odgovarajuće intance apleta i njegovoprikazivanje na ekranu obično vrši od strane sistema31 / 549.3 Pokretanje apletaPrimer - HTML stranica sa ugrađenim apletom MyApplet HTML HEAD TITLE Nasa web stranica /TITLE /HEAD BODY Ovde je rezultat naseg programa: APPLET CODE "MyApplet.class" WIDTH 150 HEIGHT 25 /APPLET /BODY /HTML Pokretanje apleta se može ostvariti i korišćenjem Java alataappletviewerPošto appletviewer traži applet tagove da bi pokrenuoaplete applet tag se vrlo često ubacuje na početak izvornogfajla (na primer MyApplet.java) pod komentarom:\\ applet code "MyApplet.class" width 200 height 100 /applet Na taj način se može pozvati appletviewerMyApplet.java, a da se izbegne kreiranje HTML fajla32 / 5416

9.5 Uvod u interaktivne interfejse Za razliku od proceduralnih programa u kojima se naredbeizvršavaju sekvencijalno, programi koji opisuju interakciju sakorisnikom pomoću grafičkih interfejsa su asinhroniProgram mora biti spreman da odgovori na razne vrste događajakoji se mogu desiti u bilo koje vreme i to redosledom kojiprogram ne može da kontroliše. Osnovne tipove događaja čineoni koji su generisani mišem ili tastaturomProgramiranje vođeno događajima (engl. event-drivenprogramming) - sistemski dodeljena nit se izvršava u petljičekajući na akcije korisnikaProgramiranje interaktivnih prozorskih aplikacija se svodi naraspoređivanje komponenti u okviru prozora, a zatim i nadefinisanje metoda koji bi služili za obradu događaja koje tekomponente mogu da proizvedu33 / 549.5 Uvod u interaktivne interfejse– primer (1/2)Primer - aplet koji interaktivno menja sadržaj labele// applet code "Dugme.class" width 300 height 75 /applet import javax.swing.*;import java.awt.event.*;import java.awt.*;public class Dugme extends JApplet {private JButtond1 new JButton("Dugme 1"),d2 new JButton("Dugme 2");private JLabel txt new JLabel("Pocetak");34 / 5417

9.5 Uvod u interaktivne interfejse– primer (2/2)private ActionListener dl new ActionListener() {public void actionPerformed(ActionEvent e) {String name e);}};public void init() ;Container cp getContentPane();cp.setLayout(new ublic static void main(String[] args) {JFrame frame new ame.EXIT ON CLOSE);JApplet applet new setVisible(true);}}35 / 549.6.3 GridLayout Formira tabelu međusobno jednakih komponenti saodgovarajućim brojem vrsta i kolona Koristi se verzija metoda add sa jednim argumentom Komponente će u tabeli biti raspoređene redom kojim sepostavljaju na površinu kontejnera tako što se tabela popunjavapo vrstama, od gornjih ka donjim, pri čemu se svaka vrstapopunjava sa leva na desno Broj vrsta i kolona se zadaje konstruktorom GridLayout(introws, int cols)i u tom slučaju komponente se maksimalnozbijaju Za određivanje horizontalnog i vertikalnog rastojanja izmeđukomponenti koristi se konstruktor GridLayout(int rows,int cols, int hgap, int vgap)36 / 5418

9.6.3 GridLayout - primer// applet code "GridLayout1.class" width 300 height 250 /applet import javax.swing.*;import java.awt.*;public class GridLayout1 extends JApplet {public void init() {Container cp getContentPane();cp.setLayout(new GridLayout(5,3));for(int i 1; i 15; i )cp.add(new JButton("Button " i));}public static void main(String[] args) {JFrame frame new on(JFrame.EXIT ON CLOSE);JApplet applet new ;frame.setVisible(true);}}37 / 549.6.7 Kombinovanje raspoređivačagrupisanjem elemenata Standardna klasa JPanel – kontejner (može da sadržava drugekomponente) i komponenta (može se postaviti na površinuapleta ili drugog panela) Time je omogućeno proizvoljno složeno ugneždavanjekomponenti, pri čemu svaki panel može posedovati proizvoljnograspoređivača svojih komponenti (na slici – tri panela sa šestkomponenti)38 / 5419

9.8. Pregled Swing komponenti Najčešće korišćene specijalizovane komponentekorisničkih interfejsa Mahom nasleđuju zajedničku osnovnu klasuJComponent Upotreba svake komponente obuhvata:– Kreiranje objekta komponente– Uključivanje objekta u neki kontejner– Komponenti se prijavljuje osluškivač koji će reagovatina odgovarajuće događaje39 / 549.8.1 JLabel i ImageIcon - primerPrimer – tri labeleIcon icon new ImageIcon("slika.gif");JLabel label1 new JLabel("Samo tekst", JLabel.CENTER);JLabel label2 new JLabel(icon, Jlabel.CENTER); // Samo slikaJLabel label3 new JLabel("Slika i tekst", icon, .CENTER);40 / 5420

9.8.2 JToolTip JToolTip je string koji služi kao uputstvo ili dodatnoobjašnjenje neke komponentePojavljuje se automatski kada pokazivač miša mirujenekoliko sekundi iznad komponente, a nestaje čim sepokazivač miša pomeriDa bismo JToolTip dodelili nekoj komponenti, potrebno jesamo pozvati metod komponente setToolTipTextPrimerlabel1.setToolTipText("Samo tekst!");label2.setToolTipText("Samo slika!");label3.setToolTipText("I tekst i slika!");41 / 549.8.6 Padajuće liste (JComboBox) Poput grupe dugmadi tipa JRadioButton, padajuća listaomogućava korisniku da odabere jednu od više ponuđenihmogućnosti, ali je izgled komponente puno kompaktniji Kada god korisnik odabere neku stavku iz menija, padajućalista generiše događaj tipa ActionEvent Padajuća lista inicijalno ne dozvoljava unos teksta sa tastature– da bi se to postiglo potrebno je pozvatisetEditable(true) Nove stavke se dodaju pozivom metoda addItem kojem sekao parametar prosleđuje string koji će biti dodat na kraj liste42 / 5421

9.8.6 Padajuće liste – primer (1/2)// applet code "ComboBoxDemo.class" width 200 height 125 /applet import javax.swing.*;import java.awt.event.*;import java.awt.*;public class ComboBoxDemo extends JApplet {private String[] description {"Prva stavka", "Druga stavka", "Treca stavka", "Cetvrta stavka","Peta stavka", "Sesta stavka", "Sedma stavka", "Osma stavka"};private JTextField jtf new JTextField(15);private JComboBox jcb new JComboBox();private JButton jb new JButton("Add items");private int count 0;public void init() {for(int i 0; i 4; i )jcb.addItem(description[count ]);jtf.setEditable(false);43 / 549.8.6 Padajuće liste - primer (2/2)jb.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent e) {if(count description.length)jcb.addItem(description[count ]);}});jcb.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent e) {jtf.setText("Index: " jcb.getSelectedIndex() ;jcb.setEditable(true);Container cp getContentPane();cp.setLayout(new public static void main(String[] args) {JFrame frame new (JFrame.EXIT ON CLOSE);JApplet applet new );frame.setVisible(true);}}" 44 / 5422

9.8.8 Meniji Svaki kontejner na njavišem nivou hijerarhije, kao što su JAplet,JFrame, JDialog i njihovi naslednici, može da sadrži najviše jednutraku sa menijima - metod setJMenuBar koji kao parametar prihvataobjekat klase JMenuBarSvaki JMenuBar može da poseduje više menija predstavljenihklasom JMenu, a svaki meni može da sadrži više stavki koje supredstavljene klasama JMenuItem, JCheckBoxMenuItem iJRadioButtonMenuItem. Stavka u meniju može biti i drugi meniSve klase kojima su predstavljene stavke u meniju nasleđuju klasuAbstractButtonBilo kojoj stavki može biti pridružen osluškivač tipa ActionListener(iliItemListener za JCheckBoxMenuItem)Meniji podržavaju dva načina skraćenog aktiviranja stavki satastature: mnemonike i akceleratore – metodi setMnemonic konstanta klase KeyEvent, odnosno setAccelerator objekatklase KeyStroke (kombinacija 'Ctrl', 'Alt' ili 'Shift‘ sa odgovarajućomtipkom)45 / 549.8.8 Meniji– primer (1/5)46 / 5423

9.8.8 Meniji– primer (2/5)// applet code "MenuDemo.class" width 410 height 275 /applet import java.awt.*;import java.awt.event.*;import javax.swing.*;public class MenuDemo extends JApplet {JTextArea jta;public void init() {JMenuBar menuBar;JMenu menu, submenu;JMenuItem menuItem;JCheckBoxMenuItem cbMenuItem;JRadioButtonMenuItem rbMenuItem;ActionListener al new ActionListener() {public void actionPerformed(ActionEvent e) {jta.append("Action [" e.getActionCommand() "] performed!\n");}};//kreiranje trake sa menijimamenuBar new JMenuBar();setJMenuBar(menuBar);//kreiranje prvog menijamenu new JMenu("A Menu");menu.setMnemonic(KeyEvent.VK A);menuBar.add(menu);47 / 549.8.8 Meniji– primer (3/5)//tri stavke tipa JMenuItemmenuItem new JMenuItem("A text-only menu item", KeyEvent.VK KeyEvent.VK 1,ActionEvent.CTRL uItem);ImageIcon smiley new ImageIcon("smiley.gif");menuItem new JMenuItem("Both text and icon", smiley);menuItem.setMnemonic(KeyEvent.VK m);menuItem new JMenuItem(smiley);menuItem.setMnemonic(KeyEvent.VK onCommand("An image-only menu item");menu.add(menuItem);//dve stavke tipa p group new ButtonGroup();rbMenuItem new JRadioButtonMenuItem("A radio button menu Mnemonic(KeyEvent.VK nuItem);menu.add(rbMenuItem);48 / 5424

9.8.8 Meniji– primer (4/5)rbMenuItem new JRadioButtonMenuItem("Another one");rbMenuItem.setMnemonic(KeyEvent.VK nuItem);menu.add(rbMenuItem);//dve stavke tipa JCheckBoxMenuItemmenu.addSeparator();cbMenuItem new JCheckBoxMenuItem("A check box menu item");cbMenuItem.setMnemonic(KeyEvent.VK uItem);cbMenuItem new JCheckBoxMenuItem("Another one");cbMenuItem.setMnemonic(KeyEvent.VK uItem);//podmenimenu.addSeparator();submenu new JMenu("A submenu");submenu.setMnemonic(KeyEvent.VK S);menuItem new JMenuItem("An item in the Stroke(KeyEvent.VK 2,ActionEvent.CTRL menuItem);menuItem new JMenuItem("Another menuItem);menu.add(submenu);9.8.8 Meniji49 / 54– primer (5/5)//drugi menimenu new JMenu("Another Menu");menu.setMnemonic(KeyEvent.VK N);menuBar.add(menu);//tekstualna povrsinajta new ).add(new JScrollPane(jta));}public static void main(String[] args) {JFrame frame new ame.EXIT ON CLOSE);JApplet applet new ame.setVisible(true);}}50 / 5425

9.9 Animacije Animacije predstavljaju nizove slika koje se na ekranu prikazuju jednanakon druge Najprirodniji način za programiranje animacije da se kreira zasebna nitkoja će animaciju izvršavati - nit možemo kreirati eksplicitno,nasleđivanjem klase Thread ili implementiranjem interfejsa Runnable iredefinisanjem odgovarajućeg metoda run Jednostavan mehanizam programiranja aplikacija – koristeći objekatklase javax.swing.Timer, koji nezavisno, bez uticaja korisnika,generiše dogadjaje u pravilnim vremenskim intervalima Programiranje animacije - kreiramo brojač i reagujemo na svaki događajkoji on generiše tako što ćemo prikazati narednu sliku animacijeDogađaji generisani brojačem su tipa ActionEvent Brojač startujemo pozivanjem metoda start (po pravilu bi ga trebalopozvati samo jednom za svo vreme postojanja brojača)Brojač takođe ima metod stop koji se poziva da bi se zaustavilogenerisanje događaja. Ako smo zaustavili brojač i želimo ponovo da gapokrenemo, moramo pozvati njegov metod restart51 / 549.9 Animacije – primer (1/3)// applet code "ScrollingText.class" width 400 height 150 /applet import java.awt.*;import java.awt.event.*;import javax.swing.*;public class ScrollingText extends JApplet {Timer brojac;String poruka "Poruka koja se skroluje.";int pozicijaPoruke -1;int sirinaPoruke, visinaPoruke;int sirinaKaraktera;52 / 5426

9.9 Animacije – primer (2/3)public void init() {JPanel display new JPanel() {public void paintComponent(Graphics g) {super.paintComponent(g);g.drawString(poruka, getSize().width - pozicijaPoruke,getSize().height/2 round(Color.red);Font fontPoruke new Font("Monospaced", Font.BOLD, 30);display.setFont(fontPoruke);FontMetrics fm getFontMetrics(fontPoruke);sirinaPoruke fm.stringWidth(poruka);visinaPoruke fm.getAscent();sirinaKaraktera fm.charWidth('P');}public void start() {if (brojac null) {ActionListener al new ActionListener() {public void actionPerformed(ActionEvent evt) {pozicijaPoruke sirinaKaraktera/2;if (getSize().width - pozicijaPoruke sirinaPoruke 0)pozicijaPoruke -1;repaint();}};53 / 549.9 Animacije – primer (3/3)brojac new Timer(50, al);brojac.start();} else {brojac.restart();}}public void stop() {brojac.stop();}private static JApplet applet;public static void main(String[] args) {JFrame frame new tion(JFrame.EXIT ON CLOSE);applet new .addWindowListener(new WindowAdapter() {public void windowClosing(WindowEvent e) setVisible(true);}}54 / 5427

1 1 / 54 1. Program Structure in Java 1.1 Java Program Basic Elements 1.2 Example of a Java Program 1.3 Java Program Structure 2 / 54 1.1.1 Identifiers Used for representation of different program structures Java-letter is character for which method Character.isJavaLetter returns true Java-digit is character for which method Character.isJavaLetter .

Related Documents:

java.io Input and output java.lang Language support java.math Arbitrary-precision numbers java.net Networking java.nio "New" (memory-mapped) I/O java.rmi Remote method invocations java.security Security support java.sql Database support java.text Internationalized formatting of text and numbers java.time Dates, time, duration, time zones, etc.

Java Version Java FAQs 2. Java Version 2.1 Used Java Version This is how you find your Java version: Start the Control Panel Java General About. 2.2 Checking Java Version Check Java version on https://www.java.com/de/download/installed.jsp. 2.3 Switching on Java Console Start Control Panel Java Advanced. The following window appears:

3. _ is a software that interprets Java bytecode. a. Java virtual machine b. Java compiler c. Java debugger d. Java API 4. Which of the following is true? a. Java uses only interpreter b. Java uses only compiler. c. Java uses both interpreter and compiler. d. None of the above. 5. A Java file with

–‘java’ command launches Java runtime with Java bytecode An interpreter executes a program by processing each Java bytecode A just-in-time compiler generates native instructions for a target machine from Java bytecode of a hotspot method 9 Easy and High Performance GPU Programming for Java Programmers Java program (.

Your Java program life cycle typically looks like this: Java program coding (via Eclipse IDE etc.) e.g. HelloWorld.java Java program compilation (Java compiler or third party build tools such as Apache Ant, Apache Maven.) e.g. HelloWord.class Java program start-up and runtime execution e.g. via your HelloWorld.main() method

besteht aus der Java-API (Java Application Programming Interface) und der Java-VM (Java Virtual Machine). Abbildung 1: Java-Plattform Die Java-API ist eine große Sammlung von Java-Programmen, die in sog. Pakete (packages) aufgeteilt sind. Pakete sind vergleichbar mit Bibliotheken in anderen Programmiersprachen und umfassen u.a.

JAR Javadoc Java Language jar Security Others Toolkits: FX Java 2D Sound . Java Programming -Week 1. 6/25. Outline Java is. Let’s get started! The JDK The Java Sandbox . into your namespace. java.lang contains the most basic classes in the Java language. It is imported automatically, so

Titulli I diplomuar në administrim publik Numri në arkiv i akreditimit [180] 03-619/9 Numri në arkiv i akreditimit [240] 03-1619/19 (10.11.2017) Vendimi për fillim me punë 03-1619/19 (10.11.2017) Data akreditimit 21.03.2017 Përshkrimi i programit Programi i administrimit publik ka një qasje multidisiplinare të elementeve kryesore të studimit në fushën e Administratës publike dhe .