Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Indovinello {
- String risposta;
- Indovinello(String risposta) {
- // this.risposta = risposta
- if (this.risposta.equals("paperino"))
- System.out.println("hai vinto!");
- }
- }
- public class JavaApplication18 {
- public static void main(String[] args) {
- Indovinello risposta1 = new Indovinello("Paperone");
- Indovinello risposta2 = new Indovinello("Paperino");
- }
- }
Add Comment
Please, Sign In to add comment