+ 1
Can u pls help me
class Test { 2 instance variable static void method1 print 1st instance variable static void method2 print 2nd instance variable public static void main(String[] args) call method1 call method2 }
4 Antworten
+ 1
Take a look at my code. There are also different methods with in the Same class. That might help...
https://code.sololearn.com/cx6fN8Ty53Wk/?ref=app
+ 1
Thank you so much...
+ 1
Arravindh sachin Your welcome :)
0
class Test {
static void method1 (int i){
System.out.println (i);
}
static void method2 (String str){
System.out.println (str);
}
public static void main (String [] args){
int number = 5;
String text = "hello";
//calling the method
method1 (number);
method2 (text);
}
}