Uploaded by Vítor Castro

Champions Academy test

advertisement
Champions Academy test
1 of 8
https://forms.office.com/pages/responsepage.aspx?id=...
Champions Academy test
This survey will help us to understand your technical knowledge and your logical thinking.
Wannabe Champion information
This section is just so you can identify yourself.
1. First and Last names
Vítor Castro
Technical chapter
In this chapter you'll have the chance to show your technical knowlege.
7/5/22, 15:39
Champions Academy test
2 of 8
https://forms.office.com/pages/responsepage.aspx?id=...
2. What is the expected Output for this code segment?
class ChampsTest {
int x = 1555;
public static void main(String[] args)
{
ChampsTest ct = new ChampsTest ();
System.out.println(ct.x);
}
}
* (3 Points)
1555
3. What is the expected Output for this code segment?
class ChampsTest {
int y = 5;
int x = y + 9;
public static void main(String[] args)
{
ChampsTest ct= ChampsTest Test();
System.out.println("x = " + ct.x + ", y = " + ct.y);
}
} * (3 Points)
x = 14 , y = 5
7/5/22, 15:39
Champions Academy test
3 of 8
https://forms.office.com/pages/responsepage.aspx?id=...
4. What is the expected Output for this code segment?
class ChampsTest {
protected int x, y;
}
class Main {
public static void main(String args[]) {
ChampsTest ct = new ChampsTest ();
System.out.println(ct.x + " " + ct.y);
}
}
* (3 Points)
imprime os valores de x e y mas não estão definidos
5. What is the expected Output for this code segment?
public class ChampsTest {
int x = 500;
ChampsTest(int i) { x = i; }
public static void main(String[] args)
{
ChampsTest ct = new ChampsTest (15);
System.out.println("x = " + ct.x);
}
}
* (3 Points)
x = 500
7/5/22, 15:39
Champions Academy test
4 of 8
https://forms.office.com/pages/responsepage.aspx?id=...
6. What is the expected Output for this code segment?
public class Champs
{
public static void main (String args[])
{
System.out.println(“Champions Academy" + 500 + 500);
}
}
* (5 Points)
Champions Academy 500 500
7. What is the expected Output for this code segment?
public class PolarisingCalculator
{
int num = 333;
public void calc(int num) { this.num = num * 100; }
public void printNum() { System.out.println(num); }
public static void main(String[] args)
{
PolarisingCalculator obj = new PolarisingCalculator();
obj.calc(5);
obj.printNum();
}
} * (5 Points)
500
7/5/22, 15:39
Champions Academy test
5 of 8
https://forms.office.com/pages/responsepage.aspx?id=...
8. What is the expected Output for this code segment?
public class Main
{
public static void main(String args[])
{
String st = "abcd";
String st2 = st;
st += "e";
System.out.println(st+ " " + st2 + " " + (st == st2));
}
} * (7 Points)
abcde abcd false
9. What is the expected Output for this code segment?
public class Main
{
public static void main(String args[])
{
StringBuffer sb = new StringBuffer("abcde");
StringBuffer sb2 = sb;
sb.append("d");
System.out.println(sb + " " + sb2 + " " + (sb == sb2));
}
} * (7 Points)
abcded abcde false
7/5/22, 15:39
Champions Academy test
6 of 8
https://forms.office.com/pages/responsepage.aspx?id=...
10. What is the expected Output for this code segment?
import java.util.*;
class I
{
public static void main (String[] args)
{
Object o = new ArrayList().iterator();
System.out.print((o instanceof List) + ", ");
System.out.print((o instanceof Iterator) + ", ");
System.out.print(o instanceof ListIterator);
}
}
* (10 Points)
false true true
11. What is the expected Output for this code segment?
public class ThreadTest implements Runnable
{
public void run()
{
System.out.printf("%d",5);
}
public static void main(String[] args) throws InterruptedException
{
Thread thread = new Thread(new ThreadTest());
thread.start();
System.out.printf("%d",7);
thread.join();
System.out.printf("%d",3);
}
}
* (12 Points)
753
7/5/22, 15:39
Champions Academy test
7 of 8
https://forms.office.com/pages/responsepage.aspx?id=...
Logical chapter
Nesta parte vais poder mostrar o teu raciocínio lógico.
12. Which is the next value in the sequence: 2Z3, 4Y5, 6X7, ...? * (2 Points)
Indica apenas a sequência no formato 0A0. Exemplo: 0A0
8W9
13. If in each number all the digits are arranged in descending order, which
among the following corresponds to the smallest number?
384
475
563
728
849
631 * (2 Points)
631
14. If in each of the words, the first and second letters are interchanged and then
all the words are arranged in alphabetical order from left to right, then which
word would be in the middle?
RAM
SIT
NET
PET
CUT
* (2 Points)
EPT
15. If a butterfly lives for 5 days and each day it flies 4 meters, how many meters
it will be traveled in 2 weeks? * (3 Points)
Indicate only the number of meteres. Exemple: 25
20
16. If in a car race you leave the 2nd contestant behind, what is your position
after the passing? * (3 Points)
Indicate only the number of the place. Exemple: 3º
7/5/22, 15:39
Champions Academy test
8 of 8
https://forms.office.com/pages/responsepage.aspx?id=...
2º
17. It takes 5 minutes for 5 robots to make 5 pulleys.
How long does it take for 100 robots to make 100 pulleys?
* (5 Points)
Indicate only the number of minutes. Exemplo: 10
5
18. A baseball bat and a baseball ball cost 1,10€ in total.
The bat is 1€ more expensive than the ball, how much costs the ball?
* (5 Points)
Indicate the value in the following format 0,00€. Exemple: 0,25€
1,05€
7/5/22, 15:39
Download