Beruflich Dokumente
Kultur Dokumente
int x,y,z,maxno;
x=Integer.parseInt(t1.getText());
y=Integer.parseInt(t2.getText());
z=Integer.parseInt(t3.getText());
maxno=t.findmax(x, y, z);
Note that an instance of a class can access both instance methods and class
methods but a class can only access class methods.
t4.setText("" + maxno); Ex. String is a class. If I create an instance of String as String s.
System.out.println(t.c); There is a static method in String class namely ‘valueOf’. Now, I can do
try6.c=try6.c+2; String.valueOf as well as s.valueOf.
f=Integer.parseInt(txtFactN.getText());
ans=try6.fact(f);
txtFact.setText("" + ans);
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new try7().setVisible(true);
}
});
}