What is needed to define a property of a JavaBean?
Correct Answer: supply public getter and setter methods
Explanation:
Note: This Question is unanswered, help us to find answer for this one
Java Skill Assessment
Your Skill Level: Poor
Retake Quizzes to improve it
More Java MCQ Questions
The EJB specification defines six distinct roles in the application development and deployment life cycle. Which of the following roles is not mentioned in it?
In an RMI application, network data destined for a particular object received by an object is known as:
Result of compiling and running the given code? public class Test75 { public static void main(String[] args) { System.out.println(new A(){{}}.toString()); } } class A { public String toString() { return getClass().getName(); } }
Best way to access a HashMap of SortedSet entries?
What would be the result when the given code is compiled and ran? public class Test99 { int main() { System.out.println('alpha'); return 0; } public static void main(String args) { System.out.println('beta'); } final static public void main(String[] s) { System.out.println('gamma'); } }
What is the output for the below code? public class C { } public class D extends C{ } public class A { public C getOBJ(){ System.out.println(“class A – return C”); return new C(); } } public class B extends A{ public D getOBJ(){ System.out.println(“class B – return D”); return new D(); } } public class Test { public static void main(String… args) { A a = new B(); a.getOBJ(); } }
public class Test{ static{ int a = 5; } public static void main(String args[]){ new Test().call(); } void call(){ this.a++; System.out.print(this.a); } } What will be the output?
public class Test{ public static void main(String args[]){ int x = 10; x = myMethod(x--); System.out.print(x); } static int myMethod(final int x){ return x--; } } What will be the output after the following program is compiled and executed?
public class Tester{ static int x = 4; int y = 9; public Tester(){ System.out.print(this.x); // line 1 printVariables(); } public static void printVariables(){ System.out.print(x); // line 2 System.out.print(y); // line 3 } public static void main(String... args) { // line 4 new Tester(); } } What is the result of compiling and running the following code?
You have the following code in a file called Test.java: class Base{ public static void main(String[] args){ System.out.println("Hello"); } } public class Test extends Base{} The object is created with new keyword: