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
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 |
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 |
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.
Can a function return a function?
What is a serializable interface?
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); } }
How can constructor chaining be done by using the super keyword?
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?
what is the constructor and how many types of constructors are used in java?
how to print a numbers from 1 to 100 with out using control structures?
how can we use the servlet as standalone apllication?should we need to extend any class?
What do you mean by jjs in java8?
Why main method is static in java?
What is the use of generics? When was it added to the Java development Kit?