What will be the result of compiling and executing Test class?
package com.udayan.oca;
public class Test {
public static void main(String[] args) {
m1(null);
}
static void m1(CharSequence s) {
System.out.println("CharSequence");
}
static void m1(String s) {
System.out.println("String");
}
static void m1(Object s) {
System.out.println("Object");
}
}
Examine the content of App.java:

Which statement best describes encapsulation?
Given:

Consider the following class:
1. package com.udayan.oca;
2.
3. public class Employee {
4. public int passportNo; //line 2
5. }
Which of the following is the correct way to make the variable 'passportNo' read only for any other class?
© Copyrights Oracledumps 2026. All Rights Reserved
We use cookies to ensure that we give you the best experience on our website (Oracledumps). If you continue without changing your settings, we'll assume that you are happy to receive all cookies on the Oracledumps.