What is Ideal Design of Class?

Answers were Sorted based on User's Feedback



What is Ideal Design of Class?..

Answer / venkat

declare variables as Private and methods which accesses
variables as public.

Is This Answer Correct ?    1 Yes 1 No

What is Ideal Design of Class?..

Answer / ershad md sk

Ideal Design of Class is First identity Different Business
Objects and identity Business Data & Business Methods on
which u r working on............Think U are working on
SHAPE class think shape is an object and Draw & erase are
business methods which u should Operate ON..And shape has
Different data objects like Square,Rectangle

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Why call by value prevents parameter value change?

0 Answers  


What is a local block?

0 Answers   Global Logic,


What is the difference between equals() and?

0 Answers  


How strings are created in java?

0 Answers  


Explain about method local inner classes or local inner classes in java?

0 Answers  






What is difference between overloading and overriding in java?

0 Answers  


Given: 10. interface A { void x(); } 11. class B implements A { public void x() { } public voidy() { } } 12. class C extends B { public void x() {} } And: 20. java.util.List list = new java.util.ArrayList(); 21. list.add(new B()); 22. list.add(new C()); 23. for (A a:list) { 24. a.x(); 25. a.y();; 26. } What is the result? 1 Compilation fails because of an error in line 25. 2 The code runs with no output. 3 An exception is thrown at runtime. 4 Compilation fails because of an error in line 20.

3 Answers  


What is the difference between static and non-static variables?

6 Answers  


What is the purpose of nested class in java?

0 Answers  


What is volatile keyword in java

0 Answers  


What is the purpose of file class?

0 Answers  


What are the characteristics of java?

0 Answers  


Categories