HomeExamsJavaTETAJEEDEVIC1012
TETAJEEDEVIC1012

Infosys Certified Java SE 17 Developer

Practice with real exam-pattern questions for Infosys Certified Java SE 17 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.

AdvancedJava90 min
Free questions

10 Infosys Certified Java SE 17 Developer practice questions with answers

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

  1. Question 1

    Assuming the following declarations are top-level types declared in the same file, which successfully compile?

    Record Cricket() {
    final int score = 10;
    }
    record Book(String words) {
    Book{
    this.words = words + "Hello World";
    }
    }
    sealed class Dance {}
    record Hobby() {
    @Override
    String toString() { return null; }
    }
    class Divi extends Dance {}

    • Cricket

      Correct
    • B

      Book

    • C

      Dance

    • D

      Hobby

    • E

      Divi

  2. Question 2

    Identify the correct way for storing timestamp values of application events in a file?

    • ZoneId class

      Correct
    • B

      ZoneOffset class

    • C

      Period class

    • D

      Instant class

  3. Question 3

    Assuming the following classes are declared as top-level types in the same file, which classes contain compiler errors? (Choose exactly two correct Options)

    sealed class Employee
    {
    public final class Permanent extends Employee {}
    }
    sealed class PartTime {}
    class Employee1 extends PartTime {}
    non-sealed class DailyWager extends PartTime {}
    sealed class Friend extends DailyWager permits PermEmpl {}
    final class PermEmpl {}

    • Employee

      Correct
    • B

      PartTime

    • C

      Employee1

    • D

      DailyWager

    • E

      Friend

  4. Question 4

    A record named `Book` has fields `title` (String) and `pageCount` (int). Can you modify the `pageCount` of a `Book` object after creation?

    • Yes, by calling a setter method.

      Correct
    • B

      Yes, by directly modifying the field.

    • C

      No, records are immutable

    • D

      Depends on the access modifiers of the fields

  5. Question 5

    Which of the following are valid record declarations? (Choose exactly two correct options)

    I. public record Child(int age) {
    private static final int age = 10; }

    II. public final record Child1() {}

    III. public abstract record Child2() {
    private static String name; }

    IV. public record Child3(boolean fun) {

    @Override public boolean fun() { return false; } }


    V. public record Child4(long size) {
    @Override public boolean equals(Object obj) { return false; }
    public void setSize(long size) {
    this.size = size;
    } }

    • Child

      Correct
    • B

      Child1

    • C

      Child2

    • D

      Child3

    • E

      Child4

  6. Question 6

    Assuming a record is defined with at least one field. Which of the following methods does the compiler always insert, that can be overridden? (Choose exactly four correct options)

    • A no-argument constructor

      Correct
    • B

      An accessor method for each field

    • C

      The toString() method

    • D

      The equals() method

    • E

      A sort method for each field

  7. Question 7

    Predict the output of the below code ?

    package com.infy;
    public class Demo{
    public static void main(String[] args) {
    Day day=Day.TUESDAY;

    switch (day) {
    case Day.MONDAY -> System.out.println("Start of the week");
    case Day.TUESDAY, Day.WEDNESDAY, Day.THURSDAY -> System.out.println("Weekday");
    default -> System.out.println("Weekend");
    }
    }
    }
    enum Day {
    MONDAY,TUESDAY,WEDNESDAY,THURSDAY
    }

    • Weekday

      Correct
    • B

      Compilation Error: Enum type cannot be used with switch statement

    • C

      Weekday

      Weekend

    • D

      The code cannot be compiled as the qualified case label must be replaced with the unqualified enum constant

  8. Question 8

    Given the sealed India class

    sealed class India permits Delhi {}

    Which Delhi class definitions, when used independently, are valid? Choose two.

    (Assume India and Delhi classes are in same package )

    • non-sealed class Delhi extends India{ }

      Correct
    • B

      sealed class Delhi extends India { }

    • C

      final class Delhi extends India { }

    • D

      protected class Delhi extends India { }

  9. Question 9

    What can you declare in the body block of a Java record? Choose two.

    • An instance variable

      Correct
    • B

      An instance method

    • C

      An instance initialization block

    • D

      A no-argument constructor

  10. Question 10

    Given three classes that successfully compile

    package com.org;
    public sealed class UserLogs permits com.infy.Admin, com.manager.InfyManager {
    }

    package com.infy;
    import com.org.UserLogs;
    public final class Admin extends UserLogs {
    }

    package com.manager;
    import com.org.UserLogs;
    public final class InfyManager extends UserLogs {
    }

    Which of the below statement is correct?

    • The classes must belong to the unnamed module.

      Correct
    • B

      The classes must belong to the same unnamed or named module.

    • C

      The classes must belong to a single named module.

    • D

      The classes may belong to different named modules.

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