Question: How many arguments and parameters are there for exampleMethod? public static void main ( String [ ] args ) { String name = Nikki; int

How many arguments and parameters are there for exampleMethod?
public static void main(String[] args){
String name = "Nikki";
int age =100;
Scanner input = exampleMethod(name, age);
System.out.println("Hello! Please enter your name:");
name = input.nextInt();
System.out.print("Nice to meet ya,"+ name +"! :)");
}
public static Scanner exampleMethod(String default1, int default2){
Scanner reader = new Scanner(System.in);
System.out.println("Alert! Alert! Right now the default values "+
"in your program are:
\tName: "+ default1+
"
\tAge: "+ default2);
System.out.println("Make sure to get new values from the user. :)");
return reader;
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!