40 likes | 262 Views
Java : JOptionPane. JOptionPane.showMessageDialog : Permit to create a windows where you can write a message which will be visible on screen. JOptionPane.showInputDialog : Permit to create a windows where you can insert an element , for example , numbers end characters.
E N D
Java : JOptionPane JOptionPane.showMessageDialog: Permit to create a windowswhereyou can write a messagewhich will be visible on screen. JOptionPane.showInputDialog: Permit to create a windowswhereyoucan insert an element, for example , numbersend characters.
JOptionPane.showMessageDialog Str= "esempio di prova! " JOptionPane.showMessageDialog(null,str) JOptionPane.showInputDialog Stringstin=JOptionPane.showInputDialog("inserire un numero"); int numero=Integer.parseInt(stin);
Java: cycle for and while • While(condition){ Body of cycle;} Condition: is the condition of the loop control , when the condition is true the loop body is executed. • For(variabledeclaration; condition; incrementingvariable){ Body of cycle;} Variable: is the control variable of the loop Condition: isequal to the whileloop Incrementing: is the incrementing of variableuntil the condition is false. Thispermit to stop the cycle.