Why are the methods of the math class static?
No Answer is Posted For this Question
Be the First to Post Answer
when asub class inherits a super class and overrides a public method of super class in sub class(public method in super class). why these methods needs to be public in sub class. (otherwise compile time error).
If I will write String s=new String("XYZ"); String s1=new String("XYZ"); if(s.equals(s1)){ sop("True"); } else{ sop("False"); } This program will give me "True". But When I am creating my own class suppose class Employee{ public Employee(String name); } Employee e= new Employee("XYZ"); Employee e1 = neew Employee("XYZ"); if(e.equals(e1)){ sop("True"); } else{ sop("False"); } Then it will give the output as "False". Can I know what is happening internally?
What are the different types of constructor?
Can we write a class without main method in java?
Explain try and catch keywords in java?
What is difference between next () and nextline () in java?
what is the purpose of the runtime class?
What is the difference between final, finally and finalize() in java?
What type of language is java?
What are java methods?
Is java 1.7 the same as java 7?
What are the advantages of java?