Twa kɔ nsɛm atitiriw so
Log in
Sign up for FREE
arrow_back
Laabri

Methods Quiz

star
star
star
star
star
Last updated over 2 years ago
10 Nsɛmmisa
1
1
1
1
1
1
1
1
1
1
Asemmisa {{asɛmmisaAhyɛnsode}}
1.

What is a method?

Asemmisa {{asɛmmisaAhyɛnsode}}
2.

When writing a method, you must always have an open and close what ?

Asemmisa {{asɛmmisaAhyɛnsode}}
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();

Asemmisa {{asɛmmisaAhyɛnsode}}
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();

Asemmisa {{asɛmmisaAhyɛnsode}}
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();

Asemmisa {{asɛmmisaAhyɛnsode}}
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();

Asemmisa {{asɛmmisaAhyɛnsode}}
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();

Asemmisa {{asɛmmisaAhyɛnsode}}
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();

Asemmisa {{asɛmmisaAhyɛnsode}}
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();

Asemmisa {{asɛmmisaAhyɛnsode}}
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();