What is the difference between a constructor and a method?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More Core Java Interview Questions

Package1 and Package2 both have a method name lets say "methodA" with different implementation. When I import both the packages in a java class how can I use both the methods?

7 Answers   Ericsson,


What is a variable in java?

0 Answers  


If a variable is declared as private, where may the variable be accessed?

0 Answers  


What is synchronization and why is it important in java programming?

0 Answers  


What is character in data type?

0 Answers  






i need to know the website that i can compile and run a java code in online.(while system doesn't contain any jdk and jre)

0 Answers  


What is byte code and why is it important to java’s use for internet programming?

0 Answers  


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?

5 Answers  


What is overloading and overriding in java?

0 Answers  


What is compareto?

0 Answers  


Is a copy constructor?

0 Answers  


Can a method inside a interface be declared as final?

0 Answers  


Categories