if i have one string class then how can you achive this
class functionality of this class?
Answer Posted / ganesh
MyString extends String{
}
This will give all the functionalites of String Object for
MyString
Above code is not working. because String is a final class.
Final class can't be extend.
| Is This Answer Correct ? | 9 Yes | 2 No |
Post New Answer View All Answers
Can a set contain duplicates?
What are sets in java?
What is immutability in java?
Which is a valid identifier?
How objects of a class are created if no constructor is defined in the class?
What are the types of inner classes (non-static nested class) used in java?
What are the types of collections in java?
Can inner class final?
What is a nested class?
What is integer valueof?
Explain inner classes ?
Can private members of a base class are inheritable justify?
Can a abstract class be defined without any abstract methods?
What is a singleton class in Java?
Tell us something about different types of casting?