C'è l'ho fatta.....(a copiare gli errori)
codice:
ControlloAnni.java:11: error: incompatible types
String s = JOptionPane.showInputDialog("Quanti anni hai?");
^
required: String
found: java.lang.String
ControlloAnni.java:13: error: no suitable method found for parseInt(String)
a = Integer.parseInt(s);
^
method Integer.parseInt(java.lang.String) is not applicable
(actual argument String cannot be converted to java.lang.String by method
invocation conversion)
method Integer.parseInt(java.lang.String,int) is not applicable
(actual and formal argument lists differ in length)
ControlloAnni.java:15: error: bad operand types for binary operator '+'
anni = a + s;
^
first type: int
second type: String
ControlloAnni.java:19: error: no suitable method found for showMessageDialog(Str
ing)
JOptionPane.showMessageDialog("Accesso consentito!");
^
method JOptionPane.showMessageDialog(Component,Object,String,int,Icon) is no
t applicable
(actual and formal argument lists differ in length)
method JOptionPane.showMessageDialog(Component,Object,String,int) is not app
licable
(actual and formal argument lists differ in length)
method JOptionPane.showMessageDialog(Component,Object) is not applicable
(actual and formal argument lists differ in length)
ControlloAnni.java:23: error: no suitable method found for showMessageDialog(Str
ing)
JOptionPane.showMessageDialog("Accesso negato!");
^
method JOptionPane.showMessageDialog(Component,Object,String,int,Icon) is no
t applicable
(actual and formal argument lists differ in length)
method JOptionPane.showMessageDialog(Component,Object,String,int) is not app
licable
(actual and formal argument lists differ in length)
method JOptionPane.showMessageDialog(Component,Object) is not applicable
(actual and formal argument lists differ in length)
.\String.java:11: error: cannot find symbol
System.out.print(String);
^
symbol: variable String
location: class String
7 errors