Laslo Kraus |
Rešeni zadaci iz programskog jezika Java Ispravke uz drugo izdanje |
---|
Mesto | Pogrešno | Ispravno |
---|---|---|
strana: 17 | ||
strana: 58 red: ↑17 |
if (b < 0) { a = -a; b = -b; } for (int i=0; i < maxProst && prosti[i]*prosti[i]<=a && |
if (b < 0) { a = -a; b = -b; } long absA = a<0 ? -a : a; for (int i=0; i < maxProst && prosti[i]*prosti[i]<=absA && |
strana: 25 red: ↑1 | Decimalan broj? s
| Decimalan broj? 9999
|
strana: 59 red: ↓21 | if (rez != "") rez += (a > 0) ? "+" : "-";
| if (rez != "" && a > 0) rez += "+";
|
strana: 61 red: ↑5 | double rastojanje (Krug k)
| public double rastojanje (Krug k)
|
strana: 67 red: ↓9 | protected String
| private String
|
strana: 71 red: ↓6 | double ter = Citaj.Int ();
| double ter = Citaj.Double ();
|
strana: 75 | ||
strana: 78 | ||
strana: 79 | ||
strana: 87 red: ↑12 | public double x, y, z;
| private double x, y, z;
|
strana: 87 red: ↑8 | double intenzitet () { … }
| public double intenzitet () { … }
|
strana: 112 red: ↑20 | import verizan;
| import verizan.*;
|
strana: 116 red: ↓20 | mat[i][j] += m2.mat[i][j];
| mat[i][j] -= m2.mat[i][j];
|
strana: 119 red: ↓9 |
12.0 14.0 16.0 18.0 23.0 25.0 27.0 29.0 34.0 36.0 38.0 40.0 |
10.0 10.0 10.0 10.0 19.0 19.0 19.0 19.0 28.0 28.0 28.0 28.0 |
strana: 126 red: ↓14 | interaktivan program | program |
strana: 137 | « Treba izbaciti. » | |
strana: 140 red: ↑19 | double a, b; char vrs;
| double a, b;
|
strana: 153 | ||
strana: 171 | ||
strana: 172 red: ↓11 | public String toStrng ();
| public String toString ();
|
strana: 190 red: ↑14 |
rez.setText ("GRESKA"); … validate(); } |
rez.setText ("GRESKA"); … } validate(); |
strana: 192 red: ↓27 | private void dodajMeni (); {
| private void dodajMeni () {
|
strana: 199 red: ↓24 |
greska.setVisible (true); fun = null; X.setText (""); … |
greska.setVisible (true); X.setText (""); … |
strana: 215 red: ↓19 |
long u = System.currentTimeMillis (); … if (v < 0.05*vmax) v = 0.05 * vmax; |
synchronized (this) { long u = System.currentTimeMillis (); … if (v < 0.05*vmax) v = 0.05 * vmax; } |
strana: 215 red: ↑6 | public double s ()
| public synchronized double s ()
|
strana: 217 red: ↑14 |
try { postavi (…); } catch (…) {} super.kreni (); |
try { postavi (…); super.kreni (); } catch (…) {} |
strana: 218 red: ↑18 |
dgmKreni.setEnabled (false); oznPobednik.setText (""); plo.validate (); try { duz = … ; } catch (…) {} kreni (); |
try { duz = … ; dgmKreni.setEnabled (false); oznPobednik.setText (""); plo.validate (); kreni (); } catch (…) {} |
strana: 221 red: ↓9 |
package vatromet; import java.awt.Canvas; |
package vatromet; |
strana: 223 red: ↑13 | void postaviOznaku( … )
| public void postaviOznaku( … )
|
strana: 235 red: ↑8 | void prazni()
| public void prazni()
|
strana: 242 red: ↓1 |
if (niz != null) { this.niz = niz; FontMetrics fm = getGraphics().getFontMetrics(); … if (p > 0) sb.append ('\n'); tks.setText (sb.toString ()); } |
if (niz != null) { this.niz = niz; Graphics g = getGraphics (); if (g != null) { FontMetrics fm = g.getFontMetrics (); … tks.setText (sb.toString ()); } } |
strana: 248 red: ↑4 |
uredjivac.postaviDt ( … ); |
if (uredjivac != null) uredjivac.postaviDt ( … ); |
strana: 262 red: ↑22 |
Rec tek = prva, pret = null; while ( … ) { pret = tek; tek = tek.sled; } |
Rec tek = prva; while ( … ) tek = tek.sled; |
strana: 268 red: ↑8 | prevodi = r.prevodi(rec);
| « Treba izbaciti. » |
Copyright © 2014, Laslo Kraus
Poslednja revizija: 4.10.2014.