Question 33 of 76 from exam 1Z0-808: Java SE 8 Programmer I

Question 33 of 76 from exam 1Z0-808: Java SE 8 Programmer I

Question

Given:

class Alpha {
int ns;
static int s;
Alpha (int ns) {
if (¢ < ns) {
Ss = ns;
this.ns = ns;

)
)
void doPrint() {

System.out.println("ns = "4+ ns + "s = "4 8);
}

)
And,

public class Testa {
public static void main(string[] args) {
Alpha refl = new Alpha(50);
Alpha ref2 = new Alpha(125);
Alpha ref3 = new Alpha(100);
refl.doPrint
ref2.doPrint ();
ref3.doPrint ();

What is the result?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

B.