{"id":137,"date":"2020-04-03T08:58:31","date_gmt":"2020-04-03T08:58:31","guid":{"rendered":"https:\/\/temp.ashkerala.com\/?p=137"},"modified":"2020-04-03T08:58:31","modified_gmt":"2020-04-03T08:58:31","slug":"java-featurs","status":"publish","type":"post","link":"https:\/\/temp.ashkerala.com\/?p=137","title":{"rendered":"Java Featurs"},"content":{"rendered":"<p><strong>Exception Handling<\/strong><\/p>\n<p> \u00a0\u00a0\u00a0 1) What is the difference between \u0393\u00c7\u00ffthrow\u0393\u00c7\u00d6 and \u0393\u00c7\u00ffthrows\u0393\u00c7\u00d6 ?And it\u0393\u00c7\u00d6s application?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : Exceptions that are thrown by java runtime systems can be handled by Try and catch blocks. With throw exception we can handle the exceptions thrown by the program itself. If a method is capable of causing an exception that it does not<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 handle, it must specify this behavior so the callers of the method can guard<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 against that exception.<\/p>\n<p> \u00a0\u00a0\u00a0 2) What is the difference between \u0393\u00c7\u00ffException\u0393\u00c7\u00d6 and \u0393\u00c7\u00fferror\u0393\u00c7\u00d6 in java?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : Exception and Error are the subclasses of the Throwable class. Exception class is used for exceptional conditions that user program should catch. With exception class we can subclass to create our own custom exception.<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Error defines exceptions that are not excepted to be caught by you program. Example is Stack Overflow.<\/p>\n<p> \u00a0\u00a0\u00a0 3) What is \u0393\u00c7\u00ffResource leak\u0393\u00c7\u00d6?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : Freeing up other resources that might have been allocated at the beginning of a method.<\/p>\n<p> \u00a0\u00a0\u00a0 4)What is the \u0393\u00c7\u00fffinally\u0393\u00c7\u00d6 block?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : Finally block will execute whether or not an exception is thrown. If an exception is thrown, the finally block will execute even if no catch statement match the exception. Any time a method is about to return to the caller from inside try\/catch block, via an uncaught exception or an explicit return statement, the finally clause is also execute.<\/p>\n<p> \u00a0\u00a0\u00a0 5) Can we have catch block with out try block? If so when?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : No. Try\/Catch or Try\/finally form a unit.<\/p>\n<p> \u00a0\u00a0\u00a0 6) What is the difference between the following statements?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Catch (Exception e),<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Catch (Error err),<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Catch (Throwable t)<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans :<\/p>\n<p> \u00a0\u00a0\u00a0 7) What will happen to the Exception object after exception handling?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : It will go for Garbage Collector. And frees the memory.<\/p>\n<p> \u00a0\u00a0\u00a0 8) How many Exceptions we can define in \u0393\u00c7\u00ffthrows\u0393\u00c7\u00d6 clause?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : We can define multiple exceptions in throws clause.<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Signature is..<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 type method-name (parameter-list) throws exception-list<\/p>\n<p> \u00a0\u00a0\u00a0 9) The finally block is executed when an exception is thrown, even if no catch matches it.<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 True\/False<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : True<\/p>\n<p> \u00a0\u00a0\u00a0 10) The subclass exception should precede the base class exception when used within the catch clause.<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 True\/False<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : True<\/p>\n<p> \u00a0\u00a0\u00a0 11) Exceptions can be caught or rethrown to a calling method.<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 True\/False<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : True<\/p>\n<p> \u00a0\u00a0\u00a0 12) The statements following the throw keyword in a program are not executed.<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 True\/False<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : True<\/p>\n<p> \u00a0\u00a0\u00a0 13) The toString ( ) method in the user-defined exception class is overridden.<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 True\/False<\/p>\n<p><strong>Multi Threading<\/strong><\/p>\n<p> \u00a0\u00a0\u00a0 1) What are the two types of multitasking?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans :<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 1.process-based<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2.Thread-based<\/p>\n<p> \u00a0\u00a0\u00a0 2) What are the two ways to create the thread?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans :<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 1.by implementing Runnable<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2.by extending Thread<\/p>\n<p> \u00a0\u00a0\u00a0 3) What is the signature of the constructor of a thread class?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : Thread(Runnable threadob,String threadName)<\/p>\n<p> \u00a0\u00a0\u00a0 4) What are all the methods available in the Runnable Interface?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : run()<\/p>\n<p> \u00a0\u00a0\u00a0 5) What is the data type for the method isAlive() and this method is available in which class?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : boolean, Thread<\/p>\n<p> \u00a0\u00a0\u00a0 6) What are all the methods available in the Thread class?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans :<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 1.isAlive()<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2.join()<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 3.resume()<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 4.suspend()<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 5.stop()<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 6.start()<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 7.sleep()<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 8.destroy()<\/p>\n<p> \u00a0\u00a0\u00a0 7) What are all the methods used for Inter Thread communication and what is the class in which these methods are defined?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans :<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 1. wait(),notify() &amp; notifyall()<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2. Object class<\/p>\n<p> \u00a0\u00a0\u00a0 8) What is the mechanisam defind by java for the Resources to be used by only one Thread at a time?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : Synchronisation<\/p>\n<p> \u00a0\u00a0\u00a0 9) What is the procedure to own the moniter by many threads?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : not possible<\/p>\n<p> \u00a0\u00a0\u00a0 10) What is the unit for 1000 in the below statement?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ob.sleep(1000)<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : long milliseconds<\/p>\n<p> \u00a0\u00a0\u00a0 11) What is the data type for the parameter of the sleep() method?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : long<\/p>\n<p> \u00a0\u00a0\u00a0 12) What are all the values for the following level?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 max-priority<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 min-priority<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 normal-priority<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : 10,1,5<\/p>\n<p> \u00a0\u00a0\u00a0 13) What is the method available for setting the priority?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : setPriority()<\/p>\n<p> \u00a0\u00a0\u00a0 14) What is the default thread at the time of starting the program?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : main thread<\/p>\n<p> \u00a0\u00a0\u00a0 15) The word synchronized can be used with only a method.<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 True\/ False<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : False<\/p>\n<p> \u00a0\u00a0\u00a0 16) Which priority Thread can prompt the lower primary Thread?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : Higher Priority<\/p>\n<p> \u00a0\u00a0\u00a0 17) How many threads at a time can access a monitor?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : one<\/p>\n<p> \u00a0\u00a0\u00a0 18) What are all the four states associated in the thread?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : 1. new 2. runnable 3. blocked 4. dead<\/p>\n<p> \u00a0\u00a0\u00a0 19) The suspend()method is used to teriminate a thread?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 True \/False<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : False<\/p>\n<p> \u00a0\u00a0\u00a0 20) The run() method should necessary exists in clases created as subclass of thread?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 True \/False<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : True<\/p>\n<p> \u00a0\u00a0\u00a0 21) When two threads are waiting on each other and can&#8217;t proceed the programe is said to be in a deadlock?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 True\/False<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : True<\/p>\n<p> \u00a0\u00a0\u00a0 22) Which method waits for the thread to die ?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : join() method<\/p>\n<p> \u00a0\u00a0\u00a0 23) Which of the following is true?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 1) wait(),notify(),notifyall() are defined as final &amp; can be called only from with in a synchronized method<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2) Among wait(),notify(),notifyall() the wait() method only throws IOException<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 3) wait(),notify(),notifyall() &amp; sleep() are methods of object class<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 1<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 3<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 1 &amp; 2<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 1,2 &amp; 3<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : D<\/p>\n<p> \u00a0\u00a0\u00a0 24) Garbage collector thread belongs to which priority?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : low-priority<\/p>\n<p> \u00a0\u00a0\u00a0 25) What is meant by timeslicing or time sharing?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : Timeslicing is the method of allocating CPU time to individual threads in a priority schedule.<\/p>\n<p> \u00a0\u00a0\u00a0 26) What is meant by daemon thread? In java runtime, what is it&#8217;s role?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : Daemon thread is a low priority thread which runs intermittently in the background doing the garbage collection operation for the java runtime system.<\/p>\n<p><strong>\u00a0\u00a0\u00a0 Inheritance<\/strong><\/p>\n<p> \u00a0\u00a0\u00a0 1) What is the difference between superclass &amp; subclass?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : A super class is a class that is inherited whereas subclass is a class that does the inheriting.<\/p>\n<p> \u00a0\u00a0\u00a0 2) Which keyword is used to inherit a class?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : extends<\/p>\n<p> \u00a0\u00a0\u00a0 3) Subclasses methods can access superclass members\/ attributes at all times?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 True\/False<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : False<\/p>\n<p> \u00a0\u00a0\u00a0 4) When can subclasses not access superclass members?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : When superclass is declared as private.<\/p>\n<p> \u00a0\u00a0\u00a0 5) Which class does begin Java class hierarchy?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : Object class<\/p>\n<p> \u00a0\u00a0\u00a0 6) Object class is a superclass of all other classes?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 True\/False<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : True<\/p>\n<p> \u00a0\u00a0\u00a0 7) Java supports multiple inheritance?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 True\/False<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : False<\/p>\n<p> \u00a0\u00a0\u00a0 8) What is inheritance?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : Deriving an object from an existing class. In the other words, Inheritance is the process of inheriting all the features from a class<\/p>\n<p> \u00a0\u00a0\u00a0 9) What are the advantages of inheritance?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : Reusability of code and accessibility of variables and methods of the superclass by subclasses.<\/p>\n<p> \u00a0\u00a0\u00a0 10) Which method is used to call the constructors of the superclass from the subclass?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : super(argument)<\/p>\n<p> \u00a0\u00a0\u00a0 11) Which is used to execute any method of the superclass from the subclass?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : super.method-name(arguments)<\/p>\n<p> \u00a0\u00a0\u00a0 12) Which methods are used to destroy the objects created by the constructor methods?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : finalize()<\/p>\n<p> \u00a0\u00a0\u00a0 13) What are abstract classes?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : Abstract classes are those for which instances can\u0393\u00c7\u00d6t be created.<\/p>\n<p> \u00a0\u00a0\u00a0 14) What must a class do to implement an interface?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans: It must provide all of the methods in the interface and identify the interface in its implements clause.<\/p>\n<p> \u00a0\u00a0\u00a0 15) Which methods in the Object class are declared as final?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : getClass(), notify(), notifyAll(), and wait()<\/p>\n<p> \u00a0\u00a0\u00a0 16) Final methods can be overridden.<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 True\/False<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : False<\/p>\n<p> \u00a0\u00a0\u00a0 17) Declaration of methods as final results in faster execution of the program?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 True\/False<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans: True<\/p>\n<p> \u00a0\u00a0\u00a0 18) Final variables should be declared in the beginning?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 True\/False<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : True<\/p>\n<p> \u00a0\u00a0\u00a0 19) Can we declare variable inside a method as final variables? Why?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : Cannot because, local variable cannot be declared as final variables.<\/p>\n<p> \u00a0\u00a0\u00a0 20) Can an abstract class may be final?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : An abstract class may not be declared as final.<\/p>\n<p> \u00a0\u00a0\u00a0 21) Does a class inherit the constructors of it&#8217;s super class?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans: A class does not inherit constructors from any of it&#8217;s super classes.<\/p>\n<p> \u00a0\u00a0\u00a0 22) What restrictions are placed on method overloading?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans: Two methods may not have the same name and argument list but different return types.<\/p>\n<p> \u00a0\u00a0\u00a0 23) What restrictions are placed on method overriding?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : Overridden methods must have the same name , argument list , and return type. The overriding method may not limit the access of the method it overridees.The overriding method may not throw any exceptions that may not be thrown by the overridden method.<\/p>\n<p> \u00a0\u00a0\u00a0 24) What modifiers may be used with an inner class that is a member of an outer class?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : a (non-local) inner class may be declared as public, protected, private, static, final or abstract.<\/p>\n<p> \u00a0\u00a0\u00a0 25) How this() is used with constructors?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans: this() is used to invoke a constructor of the same class<\/p>\n<p> \u00a0\u00a0\u00a0 26) How super() used with constructors?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : super() is used to invoke a super class constructor<\/p>\n<p> \u00a0\u00a0\u00a0 27) Which of the following statements correctly describes an interface?<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 a)It&#8217;s a concrete class<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 b)It&#8217;s a superclass<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 c)It&#8217;s a type of abstract class<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans: c<\/p>\n<p> \u00a0\u00a0\u00a0 28) An interface contains __ methods<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 a)Non-abstract<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 b)Implemented<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 c)unimplemented<\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans:c<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Exception Handling \u00a0\u00a0\u00a0 1) What is the difference between \u0393\u00c7\u00ffthrow\u0393\u00c7\u00d6 and \u0393\u00c7\u00ffthrows\u0393\u00c7\u00d6 ?And it\u0393\u00c7\u00d6s application? \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ans : Exceptions that are thrown by java runtime systems can be handled by Try and catch blocks. With throw exception we can handle the exceptions thrown by the program itself. If a method is capable of causing an&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[12],"tags":[],"class_list":["post-137","post","type-post","status-publish","format-standard","hentry","category-java-programming"],"_links":{"self":[{"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=\/wp\/v2\/posts\/137","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=137"}],"version-history":[{"count":0,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=\/wp\/v2\/posts\/137\/revisions"}],"wp:attachment":[{"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}