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

How do you represent a space in regex java?

0 Answers  


What types of inheritance does Java support?

2 Answers  


Why are getters and setters used?

0 Answers  


I have multiple constructors defined in a class. Is it possible to call a constructor from another constructor’s body?

0 Answers  


How many wrapper classes are there in java?

0 Answers  


Why can we not override static method?

0 Answers  


What are the types of literals?

0 Answers  


What is the difference between a public and a non-public class?

2 Answers  


What is the difference between an if statement and a switch statement?

0 Answers  


Explain about the interpreter in java?

0 Answers  


if am have 100 threads(for ex:T1,T2---T100) how we give priority to these threads and how the system excute these threads

2 Answers  


Addition to previous section relative word 5th one was Putrid ans: rotten, also there was prob. in 1st section on bucket weight ans:10kg, also there was a prob. on train speed to find bridge length ans:800 mtrs.

0 Answers   V2 Solutions,


Categories