hi
i am applying for entry level java positions and some of these companies make you do assessment exams once the test is done you only get the the result of the test and not a breakdown of the questions telling you what was right or what was wrong. 3 questions that got my attention (maybe because i felt that i have to guess) are below can someone kindly confirm if i am right and if not what would it be.
Thanks
1.
Int a=3; int b=0;
Switch (a) {
Case 1:
B = a + 2;
Case 2:
B = a + 3;
Case 3:
B = a + 4;
Case 4:
B = a + 5;
Case 5:
B = a + 6;
default:
B = a * 2;
}
// line A
When you execute the sample code above, what is the value of b when line A is reached?
o 0
o 5
o 6
o 8
o 9
my answer is 9
2.
At a minimum basic Java testing includes:
Functional – have all methods been called?
Procedural have all lines of code been called?
Decisional has every control point been evaluated?
Conditional has every Boolean expression been evaluated?
Performance does the code perform efficiently?
When you test a program and ensure that every line of code has been accessed, this basic testing is:
Regression
Performance
Procedural
Conditional
Functional
my answer is performance
3.
a friend passes along an applet from TrustedSoftware.com that has been signed using a private key, explaining that since the applet is from TrustSoftware.com and has been signed, it would acceptable to allow the applet full access to your hard drive. The email with the applet also contain a public key for you to verify. You verify the signature using the provided public key, and the verification passes.
o Is as trustworthy as TrustedSoftware.com
o Was signed using the private key that matched the provide public key
o Is corrupt and cannot be trusted
o Was not released by TrustedSoftware.com
o Cannot access your hard drive, since you have not registered your public key with Trustedsoftware.com
my answer is b
any help will be appreciated