I know you are supposed to instantiate an object from the service class. But how do I use it to request 3 int variables and 2 String variables from the service class?
class NumWhackee {
int one = 1;
iint two = 2;
int three = 3;
String a = "a";
String b = "b";
}
public class AllTheBestNumWhackee {
public static void main( String[] args ) {
NumWhackee numWhackee = new NumWhackee();
System.out.printlin( numWhackee.one );
// short answer: dot-notation; after you have invoked a 'new'
Copyright © 2024 Q2A.ES - All rights reserved.
Answers & Comments
Verified answer
class NumWhackee {
int one = 1;
iint two = 2;
int three = 3;
String a = "a";
String b = "b";
}
public class AllTheBestNumWhackee {
public static void main( String[] args ) {
NumWhackee numWhackee = new NumWhackee();
System.out.printlin( numWhackee.one );
}
}
// short answer: dot-notation; after you have invoked a 'new'