give me the answer of this code
class A extnds String
This code we can write r not in Java? Explain?

Answers were Sorted based on User's Feedback



give me the answer of this code class A extnds String This code we can write r not in Java? Expla..

Answer / anjani kumar jha

U cant extends String class because it is final class.

Is This Answer Correct ?    29 Yes 1 No

give me the answer of this code class A extnds String This code we can write r not in Java? Expla..

Answer / satish

it is not posible to extend String class because it is
final.if class is final we can't extend that class.

Is This Answer Correct ?    12 Yes 0 No

give me the answer of this code class A extnds String This code we can write r not in Java? Expla..

Answer / srikanth

u can just use those methods of string class

Is This Answer Correct ?    0 Yes 1 No

give me the answer of this code class A extnds String This code we can write r not in Java? Expla..

Answer / ashwini kumar vatsa

class A extends String
because String is a pre defined class that is bind with java
api.so when we declares this statements that means we want to
access the api class String,but it cannot be access by the
users.

Is This Answer Correct ?    4 Yes 15 No

Post New Answer

More Core Java Interview Questions

Say any two properties in beans?

0 Answers  


which of tha following is not a thread safe class? a) ArrayList b)Vector c)HashTable d)None

17 Answers  


11. static class A { 12. void process() throws Exception { throw new Exception(); } 13. } 14. static class B extends A { 15. void process() { System.out.println(”B”); } 16. } 17. public static void main(String[] args) { 18. new B().process(); 19. } What is the result? 1 B 2 The code runs with no output. 3 Compilation fails because of an error in line 12. 4 Compilation fails because of an error in line 15.

6 Answers  


What does opcode mean?

0 Answers  


how can i kill thread without stop() and destroy()

1 Answers  






How do you generate random numbers in java?

0 Answers  


Why we cannot override static method?

0 Answers  


What is the file extension for java?

0 Answers  


What is arraylist class in java?

0 Answers  


What is method Overriding in the perspective of OOPS?

4 Answers   TCS,


Define iterator and methods in iterator?

0 Answers  


What do you mean by an object in java?

0 Answers  


Categories