"Hai, aku maneh. Aku bakal menehi sampeyan telung pelajaran dina iki. Lan iki sing nomer loro! Gawe kepenak lan ngrungokake. Aku bakal menehi pitutur marang kowe babagan nampilake teks ing layar. Iki pancen prasaja banget: "

kode Jawa Apa sing bakal ditampilake ing layar
System.out.println("Diego");
System.out.println(3);
System.out.println("Rain" + "In" + "Spain");
Diego
3
RainInSpain
System.out.println(1 + 3);
System.out.println("1" + "3");
System.out.println(1 + "3");
System.out.println("1" + 3);
System.out.println("1" + (1 + 3));
4
13
13
13
14
System.out.println("Amigo is the best!");
System.out.println("Amigo" + "is the best!");
System.out.println("Amigo" + " " + "is the best!");
Amigo is the best!
Amigois the best!
Amigo is the best!
System.out.println(3 * 3 + 4 * 4);
System.out.println(1 * 2 + 3 * 4);
25
14
System.out.print("Diego");
System.out.print("Diego");
System.out.print("Diego");
DiegoDiegoDiego
System.out.print("Diego ");
System.out.println("is the best!");
System.out.print("Amigo ");
System.out.println("is the best!");
Diego is the best!
Amigo is the best!

"Apa sampeyan bisa ngomong babagan print () lan println () maneh?"

" Fungsi print () , digunakake kanggo nampilake teks ing layar, karakter dening karakter. Nalika layar ora ana maneh kamar ing baris, teks wiwit ditampilake ing baris sabanjuré. Sampeyan bisa nggunakake println () fungsi kanggo mungkasi nampilake teks ing baris saiki sanajan sadurunge kebak. Teks sakteruse bakal katon ing baris sabanjure."

"OK. Lan apa trick karo nambah nomer lan strings?"

"Yen sampeyan nambahake rong angka, asile uga nomer: 2 + 2 padha karo 4. Yen sampeyan nambahake nomer lan senar, nomer kasebut diowahi dadi senar. Banjur rong senar kasebut mung digabungake."

"Oh! Kuwi sing dakpikir nalika ndeleng conto, nanging sapa ngerti. Matur nuwun kanggo pelajaran sing menarik iki, Ellie."

"Sama-sama. Lan pungkasane, ana sawetara tugas saka Diego. Dheweke pengin aku mriksa kemajuan sampeyan."

1
tugas
Java Syntax,  tingkatwulangan
Dikunci
Finding bugs
If you show me someone who has never once made a programming error, we can say with certainty: you must not be talking about a human. Bug-free programming just doesn't happen. But this isn't so scary. The most important thing is to immediately accept that bugs are inevitable. We search for (or "catch", as professionals sometimes say) and correct bugs.
1
tugas
Java Syntax,  tingkatwulangan
Dikunci
We don't need any extra lines
Inexperienced and, at times, experienced programmers create superfluous code. Just in case. For example, they may declare a couple dozen variables and then not know what to do with them. In this task, someone did something weird, and we get to correct it. Look for unused variables and convert them to comments in order to hide from the compiler.