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

What are java packages? What's the significance of packages?

0 Answers  


What are access specifiers available in java?

0 Answers  


explain how many oops concepts available in java with realtime scenarios?

1 Answers   TCS,


Howmany number of objects we can store in an ArrayList. Is there any limit?

7 Answers   TCS,


Is .net better than java?

0 Answers  






can any one tell me when do u go for inheritance and polymorphism

3 Answers  


Is there any limitation of using inheritance?

0 Answers  


What is parameter tag and what is its use?

1 Answers  


Which is better stringbuffer or stringbuilder?

0 Answers  


Can finally block be used without a catch?

0 Answers  


Explain java coding standards for variables ?

0 Answers  


If set accepts only one argument then how can it compare two objects to avoid duplicates

5 Answers  


Categories