Posts

Unitwise JP impotant Questions

  Unit- 5 1)  collections program with 6-8 methods. (ArrayList/LinkedList/HashSet/TreeSet as code is same) . 2)  reading   and   writing   console   input   and   output 3)  Reading the content of file and write it into another file(Copying file content) (or) 1)  operations   of   files –   reading,   writing   and   copying   files. Unit- 3&4 1) Multi threading creating 2 threads n execute concurrently. 2) Life cycle of Thread 3) Synchronization of threads. 4) Inter thread Communication. 1) Exceptions ( Checked & unchecked Exceptions)     a). Arithmetic, ArrayIndex, Null pointer exceptions    b). Customized exceptions 2)Built in exceptions 3) Exception hierarchy   Unit-2 1)  Inheritance exampleprogram/ Types 2)  Dynamic Method Dispatch( if u prepare this, u can write same for Method Overriding /Runtie polymorphism ) 3)   Abstract ...

Java Programming Preparation

Image
  Unit-3 1)  Classify exceptions in Java into checked and unchecked exceptions and give examples for each. An exception is an abnormal condition that arises in a code at run time. In other words, an exception is a runtime error.     Checked exceptions: A checked exception is an exception that occurs at the compile time, these are also called as compile time exceptions. 1. ClassNotFoundException:  This exception is thrown when the JVM tries to load a class, which is not present in the classpath .    Class.forName("oracle.jdbc.driver.OracleDriver"); 2.IOException:  This exception is thrown when the input-output operation in a program fails  or is interrupted during the program’s execution. 3. FileNotFoundException : This exception is thrown when the program tries to access a file that does not exist or does not open. This error occurs mainly in file handling programs.   import java.io.*; class FilenotFoundDemo {   public static v...