who can we create the object of a class? in how many ways we
can create it (max 5)
Answer Posted / ravi jain
through
1) String s = "This is my Object";
2) String s1 = s.subString(1,8);
3) int[] arr = {12,45,12}; every array is an object.
4) String s2 = s + s1;
these all are also create new instances.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Explain the access modifiers for a class, method and variables?
Where is jre installed?
Does java runtime require a license?
Can I override protected method in java?
What is the difference between char and char *?
State some situations where exceptions may arise in java?
What are the differences between checked exception and unchecked exception?
What are static blocks and static initalizers in java ?
Is string is a class in java?
What is null in java?
What is a numeric literal?
What are the main uses of the super keyword?
When object is created and destroyed?
Can you explain the final method modifier?
What is incompatible types in java?