Java

Java Programming MCQ



1. An Introduction to Java

1. An Introduction to Java
 1. A Short History of Java
 2. Features or buzzwords of Java
 3. Comparison of Java and C++
 4. Java Environment
 5. Simple java program
 6. Java Tools – jdb, javap, javadoc
 7. Java IDE – Eclipse/NetBeans
MCQ Link1

2. An Overview of Java

2. An Overview of Java
 1. Types of Comments
 2. Data Types
 3. Final Variable  
 4. Declaring 1D, 2D array 
 5. Accepting input using Command line argument
 6. Accepting input from console (Using BufferedReader class) 
MCQ Link1

3. Objects and Classes

3. Objects and Classes
 1. Defining Your Own Classes
 2. Access Specifiers (public, protected, private, default)
 3. Array of Objects 
 4. Constructor, Overloading Constructors and use of ‘this’ Keyword 
 5. static block, static Fields and methods
 6. Predefined class – Object class methods (equals(), toString(), hashcode(), getClass())
 7. Inner class 
 8. Creating, Accessing and using Packages 
 9. Creating jar file and manifest file 
 10. Wrapper Classes 
 11. Garbage Collection (finalize() Method) 
 12. Date and time processing 
MCQ Link1

4. Inheritance and Interface

4. Inheritance and Interface
 1. Inheritance Basics (extends Keyword) and Types of Inheritance
 2. Superclass, Subclass and use of Super Keyword
 3. Method Overriding and runtime polymorphism  
 4. Use of final keyword related to method and class 
 5. Use of abstract class and abstract methods  
 6. Defining and Implementing Interfaces  
 7. Runtime polymorphism using interface  
 8. Object Cloning  
MCQ Link1

5. Exception Handling

5. Exception Handling
 1. Dealing Errors
 2. Exception class, Checked and Unchecked exception
 3. Catching exception and exception handling  
 4. Creating user defined exception 
 5. Assertions 
MCQ Link1

6. Strings, Streams and Files

6. Strings, Streams and Files
 1. String class and StringBuffer Class
 2. Formatting string data using format() method
 3. Using the File class 
 4. Stream classes, Byte Stream classes, Character Stream Classes 
 5. Creation of files 
 6. Reading/Writing characters and bytes 
 7. Handling primitive data types 
 8. Random Access files  
MCQ Link1

7. User Interface Components with AWT and Swing

7. User Interface Components with AWT and Swing
 1. What is AWT ? What is Swing? Difference between AWT and Swing.
 2. The MVC Architecture and Swing
3. Layout Manager and Layouts,The JComponent class
4. Components –JButton, JLabel, JText, JTextArea, JCheckBox and JRadioButton,JList, JComboBox, JMenu and JPopupMenu Class, JMenuItem and JCheckBoxMenuItem, JRadioButtonMenuItem, JScrollBar
 5. Dialogs (Message, confirmation, input), JFileChooser, JColorChooser 
 6. Event Handling: Event sources, Listeners  
 7. Mouse and Keyboard Event Handling  
 8. Adapters 
 9. Anonymous inner class  
MCQ Link1

8. Applet

8. Applet
 1. Applet Life Cycle
 2. appletviewer tool
 3. Applet HTML Tags  
 4. Passing parameters to Applet 
 5. repaint() and update() method 
MCQ Link1

9. Collection

9. Collection
 1. Introduction to the Collection framework
 2. List – ArrayList, LinkedList and Vector,Stack,Queue
 3. Set - HashSet, TreeSet, and LinkedHashSet  
 4. Map – HashMap, LinkedHashMap, Hashtable and TreeMap  
 5. Interfaces such as Comparator, Iterator, ListIterator, Enumeration  
MCQ Link1

10. Database Programming

10. Database Programming
 1. The design of jdbc, jdbc configuration
 2. Types of drivers
 3. Executing sql statements, query execution  
 4. Scrollable and updatable result sets  
 5. Metadata – DatabaseMetadata, ResultSetMetadata  
 6. Transactions – commit(), rollback(), SavePoint(Database : PostgreSQL) 
MCQ Link1

11. Servlet

11. Servlet
 1. Introduction to Servlet and Hierarchy of Servlet
 2. Life cycle of servlet
 3. Tomcat configuration (Note: Only for Lab Demonstration) 
 4. Handing get and post request (HTTP)  
 5. Handling a data from HTML to servlet 
 6. Retriving a data from database to servlet 
 7. Session tracking – User Authorization, URL rewriting, Hidden form fields, Cookies and HttpSession 
MCQ Link1

12. JSP

12. JSP
 1. Simple first JSP program
 2. Life cycle of JSP
 3. Implicit Objects 
 4. Scripting elements – Declarations, Expressions, Scriplets, Comments  
 5. JSP Directives – Page Directive, include directive  
 6. Mixing Scriplets and HTML  
 7. Example of forwarding contents from database to servlet, servlet to JSP and displaying it using JSP scriplet tag  
MCQ Link1

13. Multithreading

13. Multithreading
 1. What are threads?
 2. Life cycle of thread
 3. Running and starting thread using Thread class  
 4. Thread priorities  
 5. Running multiple threads 
 6. The Runnable interface 
 7. Synchronization and interthread communication 
MCQ Link1

14. Networking

14. Networking
 1. Networking basics – Protocol, Addressing, DNS, URL, Socket, Port
 2. The java.net package – InetAddress, URL, URLConnection class
 3. SocketServer and Socket class 
 4. Creating a Socket to a remote host on a port (creating TCP client and server) 
 5. Simple Socket Program Example  
MCQ Link1