HomeExamsJavaTETAJEEDEVIC1011
TETAJEEDEVIC1011

Infosys Certified Java SE11 Developer

Practice with real exam-pattern questions for Infosys Certified Java SE11 Developer. Each question includes a detailed explanation to help you understand the concept, not just memorise the answer. Try 10 questions free — no login required.

BeginnerJava90 min
Free questions

10 Infosys Certified Java SE11 Developer practice questions with answers

Real Lex exam-pattern multiple-choice questions for the Infosys Certified Java SE11 Developer certification. Each question includes the correct answer. The full question bank is available to Premium members.

  1. Question 1

    Predict the output of the given code. (Assume all the necessary imports are done.)

    public class Main {
    	public static void main(String[] args) {
    		int[] arr = { 70, 50, 30, 10, 20, 40, 60 };
    		int value = findValue(arr);
    		System.out.println(value);
    	}
    	private static int findValue(int[] array) {
    		int h = Integer.MIN_VALUE;
    		int s = Integer.MIN_VALUE;
    		for (int i : array) {
    			if (i > h) {
    				s = h;
    				h = i;
    			} else if (i > s) { 
    				s = i;
    			}
    		}
    		return s;
    	}
    }
    

    • No output

      Correct
    • B

      10

    • C

      70

    • D

      60

  2. Question 2

    Predict the output obtained on executing the given code snippet. (Assume the code is present in a main() method and all the necessary imports are done)

    int vehicleNumber = 2185;
    int sum = 0;
    while (vehicleNumber != 0) {
    	sum += vehicleNumber % 10;
     	vehicleNumber /= 10;
    }
    if (sum % 3 == 0 || sum % 5 == 0 || sum % 7 == 0) {//Line1
    	System.out.println("It is a lucky number");
    } else {
    	System.out.println("It is not a lucky number");
    }
    

    • No Output

      Correct
    • B

      Compilation error as sum cannot be resolved to a variable at Line1

    • C

      It is a lucky number

    • D

      It is not a lucky number

  3. Question 3

    Predict the output of the following code.

    public class Main
    {
      public static void main(String[] args)
      {
      int[] arr1={5,6,3,1,2};
      int n=arr1.length+1;
            int s=n*(n+1)/2;
            int r=0;
            for (int i = 0; i < arr1.length; i++) {
                r+=arr1[i];
            }
            int f=s-r;
            System.out.println(f);
        }
    } 
    

    • 4

      Correct
    • B

      3

    • C

      7

    • D

      5

  4. Question 4

    Predict the output obtained on executing the given code.

    class Main {
    	public static void main(String args[]) {
    		
    		int x, y;
    		x =2;
    		y= 3;
    		System.out.println(countt(y, x));
    	}
    	static int counter(int y, int x) {
    		int count = 0;
    		if (x == 1)
    			return y;
    		else {
    			for (int i = 1; i <= y; i++) {
    				for (int j = 1; j <= y; j++) {
    					if (j % i == 0)
    						count++;
    				}
    			}
    		}
    		return count;
    	}
    	static int countt(int y, int x) {
    		if (x == 1)
    			return y;
    		if (x == 2) {
    			return counter(y, x);
    		}
    		int mid = x / 2;
    		int a = countt(y, x - mid);
    		int b = counter(y, mid);
    		return a + b - 1;
    	}
    }
    

    • 5

      Correct
    • B

      4

    • C

      7

    • D

      No output

  5. Question 5

    Which access specifiers should be placed at Line1 and Line2 to generate ‘I am HR true’ as the output of the given code?

    class Employee{
    	protected void role() {
    		System.out.print("I am an Employee ");
    	}
    	protected boolean onRole() {
    		return false;
    	}
    }
    class HR extends Employee{
    	void role() {  //Line1
    		System.out.print("I am HR ");
    	}
    	 boolean onRole() { //Line2
    			return true;
    		}
    }
    public class Tester {
    	public static void main(String args[]) {
    		Employee h= new HR();
    		h.role();
    		System.out.println(h.onRole());
    	}
    }
    

    • public at Line1 and default at Line2

      Correct
    • B

      private at Line1 and Line2

    • C

      default at Line1 and public at Line2

    • D

      protected at Line1 and default at Line2

    • E

      public at Line1 and protected at Line2

  6. Question 6

    Given:

    public class Test {
    	private int sum;
    	public int compute() {
     		int x = 0;
     		while (x < 3) {
      			sum += ++x;
     		}
     		return sum / 4;
    	}
    	public static void main(String[] args) {
     		Test t = new Test();
     		int sum = t.compute();
     		sum = t.compute();
     		t.compute();
     		System.out.println(sum);
    	}
    }

    What is the result?

    • An exception is thrown at runtime

      Correct
    • B

      6

    • C

      3

    • D

      9

  7. Question 7

    Given:

    public class Thing {
    	private String name;
    	public Thing(String name) {
     		this.name = name;
    	}
    	public String toString() {
     		return name;
    	}
    }

    and

    public class Tester {
    	public static void main(String[] args) {
     		Thing[] things = processThings();
     		/* line 1 */
     		for (Thing t : things) {
      			System.out.println(t);
     		}
    	}
    	public static Thing[] processThings() {
     		Thing[] things = new Thing[3];
     		things[0] = new Thing("Hat");
     		things[1] = new Thing("Rat");
     		things[2] = things[0];
     		things[0] = new Thing("Cat");
     		things[1] = things[2];
     		return things;
    	}
    }

    How many Thing objects are eligible for garbage collection in line 1?

    • 3

      Correct
    • B

      1

    • C

      2

    • D

      0

  8. Question 8

    Given:

    interface A{
    	public void m1();
    }
    interface B extends A{
    	public default void m2() {
    		System.out.println("M2");
    	} 
    }
    interface C extends B{
    	public default void m3() {
    		System.out.println("M3");
    	 }
    }
    interface D extends C{
    		public void m4();
    }
    

    Choose the correct option with respect to the above code.

    • A and B are functional interfaces, but C and D are not functional interfaces.

      Correct
    • B

      A is functional interface, but B, C, and D are not functional interfaces.

    • C

      A, B, and C are functional interfaces, but D is not functional interface.

    • D

      A and D are functional interfaces, but B and C are not functional interfaces.

  9. Question 9

    Given:

    public class Main {
    	class Student {  //line 1
     		String classname;
     		public Student(String classname) { //line 2
      			this.classname = classname;
     		}
    	}
    	public static void main(String[] args) {
     		var student = new Student("Biology"); //line 3
    	}
    }

    Which two independent changes will make the Main class compile? (Chosoe two)

    • Change line 1 to static class Student {

      Correct
    • B

      Move the entire Student class declaration to a separate Java file, Student.java

    • C

      Change line 1 to public class Student {

    • D

      Change line 2 to public Student(String classname)

    • E

      Change line 3 to Student student = new Student("Biology");

  10. Question 10

    Given:

    public final class X {
       private String name;
       public String getName() {
           return name;
       }
       public void setName(String name) {
           this.name = name;
       }
       public String toString() { return getName(); }
    }

    and

    public class Y extends X {
       public Y(String name) {
           super();
           setName(name);
       }
       public static void main (String... args) {
           Y y = new Y("HH"); 
           System.out.println(y);
       }
    }

    What is the result?

    • HH

      Correct
    • B

      Y@<<hashcode>>

    • C

      null

    • D

      The compilation fails

Pricing

Pay once. Clear every cert this year.

One subscription, full Telegram channel access, every PDF posted during your membership.

Monthly
50% OFF
₹1,300₹2,600
Per month · cancel anytime
  • Full access to all 1,357+ certifications
  • Monthly updated question banks
  • Telegram private channel access
  • Cancel anytime
Get Monthly
POPULAR
Quarterly
44% OFF
₹1,800₹3,200
That's ₹600/mo · billed for 3 months
  • Everything in Monthly
  • Save ₹2,100 vs monthly billing
  • Priority answer key requests
  • Best for increasing DQ score fast
Get Quarterly
BEST VALUE
Lifetime
52% OFF
₹2,400₹5,000
One-time · lifetime access
  • Everything in Quarterly
  • Lifetime channel access — no renewals
  • All future certifications included
  • Priority response from admin team
Get Lifetime
FAQ

Common questions, straight answers.

A monthly-updated Telegram channel where we post real exam-pattern question banks and detailed answer keys for 1,357+ Infosys Lex certifications. You join once, you get every PDF posted during your membership.

Right after payment on our Graphy page, you'll receive a private invite link to the Telegram channel. Access is instant — usually under 30 seconds.

We compile question banks from the actual Lex test pattern, sourced and verified by 180K+ community members who've recently cleared these exams. Match rate is consistently 85–95%.

Every single month. When Infosys rolls out new versions of certifications, we post updated dumps within 7–10 days. You'll see channel activity weekly.

Clearing certifications is one of the highest-weighted DQ factors. Members typically clear 3–5 certifications in their first 3 months, which moves DQ scores up by a full band.

i
InfyLexDumps

Independent exam preparation platform for Infosys Lex certifications. Real exam-pattern question banks, monthly updates, 180K+ community members.

Join Premium Telegram
Contact
  • @prepflixadmin
  • admin@prepflix.net
This platform is an independent educational resource and is not affiliated with or endorsed by Infosys Ltd. All certification names referenced are property of their respective owners.
© 2026 InfyLexDumps
Join Premium Telegram