What kinds of properties can a JavaBean have?
Correct Answer: constrained properties
Explanation:
Note: This question has more than 1 correct answers
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
Is it possible to get mapping information from parent class that entity extends?
Will the following code compile? public interface Repository{ void save(Object data); } public abstract class RepositoryImpl implements Repository{ }
Say we have java entity with date field. For example: @Entity class User{ private Date joinDate; public Date getJoinDate(){ return joinDate; } public void setJoinDate(Date joinDate){ this.joinDate = joinDate; } } What JPA annotation will help us specify date format that will be used in database?
Which will compile without any error?
Which classes might be considered encapsulated: class Jason{ public int age; public String name; } class Sam{ private int age; private String name; public void setAge(int age){ this.age = age; } public intgetAge(){ return age; } public String getName(){ return name; } public void setName(String name){ this.name = name; } }
Which statement is true about the given code? public class Test78 { public static void main(String[] args) throws Exception { new JBean().setHeight(1).setWidth(2).setDepth(3).setDensity(9); } } class JBean { private int height, width, depth, density; public JBean setHeight (int h) { this.height = h; return this; } public JBean setWidth (int w) { this.width = w; return this; } public JBean setDepth (int d) { this.depth = d; return this; } public JBean setDensity (int d) { this.density = d; return this; } }
Output of the given code? public class Test15 { public static void main(String[] args) { VO a = new VO(2); VO b = new VO(3); swapONE(a, b); print(a, b); swapTWO(a, b); print(a, b); } private static void print(VO a, VO b) { System.out.print(a.toString() + b.toString()); } public static void swapONE(VO a, VO b) { VO tmp = a; a = b; b = tmp; } public static void swapTWO(VO a, VO b) { int tmp = a.x; a.x = b.x; b.x = tmp; } } class VO { public int x; public VO(int x) { this.x = x; } public String toString() { return String.valueOf(x); } }
Which type(s) cannot be used as generics?
Which is true? (Choose all that apply) public class UpWork { public staic void main(String[] args) { UpWorkupw = new UpWork(); }}
How we can make entity class or method final in JPA ?