Search
-
Pokud si nejste jisti, mrkněte na minitest.
Polymorfizmus
interface
enum
–
nákupu, výrobce a záruční dobu. Umožněte výpis informací o produktu a zbývající dobu záruky. U pamětí navíc sledujte kapacitu a u procesorů počty jader a frekvenci. Co by bylo typické pro další komponenty?
Pokud si nejste jisti, mrkněte na výsledky minitestu.
try
catch
Exception
Map
Set
List
paint
JApplet
JLabel jl = new JLabel(); jl.setText("<html><b>x<sup>2</sup></b></html>");
class Vlakno implements Runnable { static int stati = 1; int in = 1; public synchronized void run() { System.out.printf("1: in: %5d, stati:%5d\n", in++, stati++); if (in < 3) { try { wait(); } catch (InterruptedException ex) { } } else { notify(); } System.out.printf("2: in: %5d, stati:%5d\n", in++, stati++); } } public class Main { public static void main(String[] args) { Vlakno v1 = new Vlakno(); Vlakno v2 = new Vlakno(); Thread t1 = new Thread(v1); Thread t2 = new Thread(v1); Thread t3 = new Thread(v2); Thread t4 = new Thread(v2); t1.start(); t2.start(); t3.start(); t4.start(); System.out.println("Identifikace: " + t1.getId() + t2.getId() + t3.getId() + t4.getId()); } }
Vyberte pravdivé výroky(pečlivě rozlišujte musí x může x nesmí), svá tvrzení zdůvodněte:
Identifikace: 891011
Identifikace: 1232
Identifikace: 1 2 3 2
2: in: 3, stati: 4
2: in: 3, stati: 2
if, for, while, switch
println()
go to
struct
union
extern
switch
**p_pole
Struct
Union
koreny→re1