Log in
Sign up for FREE
arrow_back
Library
Methods Quiz
By Mickey Arnold
star
star
star
star
star
Share
share
Last updated almost 2 years ago
10 questions
Add this activity
1
1
1
1
1
1
1
1
1
1
Question 1
1.
What is a method?
a tool that makes a program longer
a tool that complicates a program
a tool that helps organize a program
a tool that makes a program more disorganized
a tool that makes a program harder to read
Question 2
2.
When writing a method, you must always have an open and close what ?
parenthesis and brace
parenthesis
parenthesis, bracket and brace
brace
bracket
Question 3
3.
What is output by the code below?
public class CS
{
public void one()
{
System.out.print("fun");
}
}
//code in the main of another class
CS test = new CS();
test.one();
Question 4
4.
What is output by the code below?
public class CS
{
public void one()
{
System.out.print("fun");
}
}
//code in the main of another class
CS test = new CS();
test.one();
test.one();
Question 5
5.
What is output by the code below?
public class CS
{
public void one()
{
System.out.print("fun");
}
}
//code in the main of another class
CS test = new CS();
test.one();
test.one();
test.one();
test.one();
Question 6
6.
What is output by the code below?
public class CS
{
public void one()
{
System.out.print("go");
}
public void two()
{
System.out.print("back");
}
}
//code in the main of another class
CS test = new CS();
test.one();
test.two();
Question 7
7.
What is output by the code below?
public class CS
{
public void one()
{
System.out.print("go");
}
public void two()
{
System.out.print("back");
}
}
//code in the main of another class
CS test = new CS();
test.one();
test.two();
test.two();
Question 8
8.
What is output by the code below?
public class CS
{
public void one()
{
System.out.print("go");
}
public void two()
{
System.out.print("back");
}
}
//code in the main of another class
CS test = new CS();
test.one();
test.two();
test.one();
test.two();
Question 9
9.
What is output by the code below?
public class CS
{
public void one()
{
System.out.print("go");
}
public void two()
{
System.out.print("back");
}
}
//code in the main of another class
CS test = new CS();
test.two();
test.one();
test.two();
Question 10
10.
What is output by the code below?
public class CS
{
public void one()
{
System.out.print("go");
}
public void two()
{
System.out.print("back");
}
}
//code in the main of another class
CS test = new CS();
test.one();
test.two();
test.two();
test.one();