if i have one string class then how can you achive this
class functionality of this class?

Answers were Sorted based on User's Feedback



if i have one string class then how can you achive this class functionality of this class?..

Answer / 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

if i have one string class then how can you achive this class functionality of this class?..

Answer / guest

sdfg

Is This Answer Correct ?    0 Yes 4 No

if i have one string class then how can you achive this class functionality of this class?..

Answer / n. bala subramanian

MyString extends String{
}

This will give all the functionalites of String Object for
MyString

Is This Answer Correct ?    0 Yes 5 No

Post New Answer

More Core Java Interview Questions

all are saying java doesn't support multiple inheritance but by default Object class is super class for all the user defined classes and we can extend atmost one class so each class can extend more than one class so java supports multiple inheritance?i am confused with this,pls any one explain me.

8 Answers   CFG,


Can a function return a function?

0 Answers  


What is a serializable interface?

4 Answers  


10. What is the output of the following Java program? class Main { public static void main(String args[]){ final int i; i = 10; System.out.println(i); } } 10. What is the output of the following Java program? class Main { public static void main(String args[]){ final int i; i = 10; System.out.println(i); } }

0 Answers  


How can constructor chaining be done by using the super keyword?

0 Answers  






Q) I have a ArrayList object, in that object i have added 5 integer values, 5 float values, 5 string values. Now question is how can delete particular type of data ( i.e all int values or all float values or string values) in that list object at a time?

3 Answers   Aricent,


what is the constructor and how many types of constructors are used in java?

0 Answers  


how to print a numbers from 1 to 100 with out using control structures?

4 Answers   IBM,


how can we use the servlet as standalone apllication?should we need to extend any class?

2 Answers   Logica CMG,


What do you mean by jjs in java8?

0 Answers  


Why main method is static in java?

0 Answers  


What is the use of generics? When was it added to the Java development Kit?

0 Answers   Impetus,


Categories