What is user defined exception in Java?
Answer / Pritibhi Kumar
User-defined exceptions are custom exceptions created by developers to handle specific error conditions that may occur within a program. They extend the built-in Exception class or one of its subclasses and can be thrown when an unexpected event occurs during the execution of a method.
| Is This Answer Correct ? | 0 Yes | 0 No |
enlist some features of jdk.
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?
using equals method overriding which objects are compared?i.e same class objects or other class objects?Explain me.
what is mutual exclusion? : Java thread
What is a class variable?
what do you understand by synchronization? : Java thread
What is the default initialized value of String type variable?
What is difference between arraylist and list in java?
What do you understand by synchronization?
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)
Which java version is latest?
What is a Java package and how is it used?