IT-504 (C) · Java Programming/Unsolved PYQ Paper
IT-504-C Java Programming - Nov 2022 Question Paper
Under each question, How to answer lists the points an answer should cover, outlined by CampusPrep from the syllabus. Check the details against your textbook.
-
7 Marksa"Java is object-oriented language". Give reasons to supporting the given argument.
How to answer
- Define object-oriented programming features
- Show Java supports encapsulation, inheritance, polymorphism, abstraction
- Explain classes, objects, data hiding in Java
- Conclude with reasons why Java is called purely object-oriented with exceptions
-
7 MarksbHow to create a package in Java? Explain with an example.
How to answer
- Define Java package and its purpose
- Steps to create package using package statement
- Compilation and directory structure
- Example of creating and importing package
-
7 MarksaExplain in brief about event sources and event listeners.
How to answer
- Define event, event source and event listener
- List common event sources e.g. Button, Checkbox
- Explain listener interfaces and registration
- Brief event handling flow with example
-
7 MarksbExplain the implementation process of multiple inheritance in Java.
How to answer
- State Java does not support multiple inheritance via classes
- Explain use of interfaces to achieve it
- Steps to implement multiple interfaces
- Example program with two interfaces
-
7 MarksaExplain Exception-handling in Java with the suitable example.
How to answer
- Define exception and exception hierarchy
- Explain try, catch, finally, throw, throws
- Provide suitable example program
- Explain unchecked vs checked exceptions
-
7 MarksbExplain about AWT facilities of Java.
How to answer
- Define AWT and its role in GUI
- List AWT components: Frame, Button, TextField etc.
- Explain containers, layout managers
- Mention event handling with AWT
-
7 MarksaWhat are the basic steps for using JDBC to access database? Explain briefly with syntax.
How to answer
- List basic JDBC steps: load driver, connect, statement, execute, close
- Give syntax for each step with DriverManager
- Brief explanation of ResultSet and Statement types
- Example code snippet
-
7 MarksbExplain the term "try", "catch", "throw" and "assertions" with examples.
How to answer
- Define try, catch, throw and assertions
- Explain syntax and purpose of each
- Give small example for each
- Differentiate throw vs throws and assertion use
-
7 MarksaWrite a Java program to illustrate communication between client and server.
How to answer
- Explain Socket and ServerSocket classes
- Write server program accepting client
- Write client program sending/receiving data
- Show output of communication
-
7 MarksbExplain thread synchronization with an example program.
How to answer
- Define synchronization and need in multithreading
- Explain synchronized method and block
- Provide example program with shared resource
- Explain output without vs with synchronization
-
7 MarksaExplain the life cycle of Applet.
How to answer
- Define applet and its lifecycle stages
- Explain init, start, stop, destroy, paint methods
- Draw lifecycle diagram
- Explain sequence with example
-
7 MarksbWrite a java program to demonstrate multithreading operation.
How to answer
- Explain Thread class and Runnable interface
- Write program creating multiple threads
- Show start, run, sleep/join methods
- Show output demonstrating concurrency
-
7 MarksaWrite a program to copy content of one file to another using character stream class.
How to answer
- Explain FileReader and FileWriter character streams
- Steps to open, read, write and close files
- Write complete Java program for file copy
- Handle IOException with try-catch
-
7 MarksbDiscuss various levels of access protection available for packages and their Implementations.
How to answer
- Define private, default, protected, public levels
- Explain visibility for packages and subclasses
- Explain implementation with example
- Summarize access table
-
7 MarksaWhat is a Stream? What is the difference between byte streams and character streams? How are they used to capture input from the user?
How to answer
- Define stream as flow of data
- Differentiate byte streams vs character streams
- List classes: InputStream/OutputStream vs Reader/Writer
- Explain capturing user input with System.in and BufferedReader/Scanner
-
7 MarksbExplain any two of the following:
- i)Copy Constructor
- ii)JDBC-ODBC Bridge
- iii)Abstract Class
- iv)Interface
How to answer
- Select any two topics from the list
- Define each with syntax and purpose
- Give example program/snippet
- Mention use cases
Go to where you left off?
Quick Add to Notes
Save questions, your own notes and screenshots into notes filed by unit. It takes a free account.
Create free accountHave an account? Log in
Notes Panel