0% found this document useful (0 votes)
19 views6 pages

Java GTU 3153203 Exam Questions Guide

The document provides a comprehensive list of high-probability exam questions for the Java GTU Subject Code 3153203, organized by unit. It includes most-asked topics, expected questions, and exam tricks for each unit, covering fundamental concepts like Java basics, classes, inheritance, exception handling, multithreading, I/O programming, collections, and object-oriented modeling. Additionally, it highlights frequently repeated questions and exam-focused tricks that are likely to appear in future exams.

Uploaded by

Sujal Vaghela
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views6 pages

Java GTU 3153203 Exam Questions Guide

The document provides a comprehensive list of high-probability exam questions for the Java GTU Subject Code 3153203, organized by unit. It includes most-asked topics, expected questions, and exam tricks for each unit, covering fundamental concepts like Java basics, classes, inheritance, exception handling, multithreading, I/O programming, collections, and object-oriented modeling. Additionally, it highlights frequently repeated questions and exam-focused tricks that are likely to appear in future exams.

Uploaded by

Sujal Vaghela
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

Here is **the most accurate chapter-wise “most-asked / high-probability future exam

questions list”** for your **Java GTU Subject Code 3153203** based on your syllabus
AND based on patterns seen from **multiple previous years’ papers (P1–P5)**.

I am giving you:

✅ Most-asked question topics


✅ Expected questions (high chance for future exams)
✅ “Trick topics” → small topics asked again & again
✅ Perfect for last-minute preparation

---

# ✅ **UNIT–WISE MOST ASKED & HIGH-PROBABILITY QUESTIONS**

---

# **📘 Unit 1: Basics of Java**

### **Most Asked Topics**

* Features of Java (**VERY repeated**)


* JVM, Bytecode, JDK, JRE
* Data types & Operators
* Control statements (if-else, switch, loops)
* Arrays (1D + 2D)
* String class functions
* StringBuffer functions
* Wrapper class
* Command line arguments

### **High-Probability Questions**

* Explain **Features of Java** with examples


* Difference between **JDK vs JVM vs JRE**
* Explain **String vs StringBuffer**
* How **switch case** works with example
* Write program for:

* Sum of array elements


* Reverse string using StringBuffer

### **Tricks Repeated in Exams**

* “Why is Java platform independent?” → Answer: *Because of bytecode + JVM*


* “String immutable – why?”
* “Difference between primitive & wrapper class”

---

# **📘 Unit 2: Classes, Objects & Methods**

### **Most Asked Topics**

* Constructor, constructor overloading


* Method overloading + recursion
* Static keyword
* This keyword
* finalize() method
* Inner class, Anonymous inner class
* Abstract class

### **High-Probability Questions**

* Difference between **method overloading vs overriding**


* Importance of **this keyword**
* Write program for method overloading
* Explain **static** with example
* Explain **constructor chaining**

### **Exam Tricks**

* finalize() → rarely used but asked multiple times


* Overloading rules always come as theory + small code output

---

# **📘 Unit 3: Inheritance & Interfaces**

### **Most Asked Topics**

* Types of inheritance (Java supports? Which it doesn’t?)


* Multilevel inheritance (super keyword)
* Method overriding
* Final keyword (stop inheritance)
* Interface & multiple inheritance
* instanceof operator
* Dynamic method dispatch
* Abstract class vs Interface

### **High-Probability Questions**

* Difference between **abstract class vs interface** (MOST repeated)


* Explain **dynamic method dispatch** with example
* How **super** keyword works in constructors
* Why Java does not support multiple inheritance?
* Interface inheritance example

### **Exam Tricks**

* Dynamic method dispatch always comes with small code snippet


* “final” keyword → 3 meanings (variable, method, class)

---

# **📘 Unit 4: Package & Exception Handling**

### **Most Asked Topics**

* Creating package
* CLASSPATH use
* static import
* Types of exceptions
* Difference: checked vs unchecked exceptions
* try–catch–finally
* throw vs throws
* Custom exception
### **High-Probability Questions**

* Explain **throw vs throws** (Guaranteed 1 question)


* Write a custom exception program
* List built-in exceptions
* Explain need of package and import

### **Exam Tricks**

* finally block ALWAYS executes (asked many times)


* throw → object
* throws → method declaration

---

# **📘 Unit 5: Multithreaded Programming**

### **Most Asked Topics**

* Thread class vs Runnable interface


* Life cycle of thread
* Thread priority
* Synchronization
* Inter-thread communication
* Deadlock

### **High-Probability Questions**

* How to create thread (two ways) – ALWAYS ASKED


* What is synchronization?
* Explain deadlock with code

### **Exam Tricks**

* Difference between **start() vs run()** → 90% chances


* synchronized keyword use

---

# **📘 Unit 6: IO Programming**

### **Most Asked Topics**

* Byte stream vs Character stream


* FileInputStream / FileOutputStream
* FileReader / FileWriter
* BufferedReader

### **High-Probability Questions**

* Program to copy file using IO streams


* Difference between byte vs character stream
* Use of BufferedReader
* Explain InputStreamReader & OutputStreamWriter

### **Exam Tricks**

* BufferedReader → readLine()
* File class → only metadata (name, size, exists)
---

# **📘 Unit 7: Collection & Networking**

### **Most Asked Topics**

* List, ArrayList, LinkedList


* Vector, Enumeration
* Properties class
* Basics of [Link] package
* InetAddress
* Socket programming (DatagramSocket, DatagramPacket)

### **High-Probability Questions**

* Difference between ArrayList vs LinkedList


* Explain Vector & Enumeration
* InetAddress functions
* Socket vs DatagramSocket

### **Exam Tricks**

* Vector → synchronized
* ArrayList → dynamic array
* Properties → used for config files

---

# **📘 Unit 8–9: Object Orientation & Modeling**

### **Most Asked Topics**

* Modeling concepts
* Class model, state model, interaction model
* Association, aggregation, composition
* Generalization & inheritance
* Events, state diagrams
* Sequence diagram
* Activity diagram

### **High-Probability Questions**

* Draw **class diagram** for any system


* Difference between **association, aggregation, composition**
* Activity diagram for login system
* State diagram example
* Explain metadata, constraints

### **Exam Tricks**

* Aggregation = hollow diamond


* Composition = solid diamond
* Sequence diagram → lifelines + messages

---

# ✅ **🔥 Super Important “Frequently Repeated Questions Across Many Years”**


(From your uploaded papers P1–P5)

These topics appear *almost every year*:

1### **1 Explain Greedy Strategy steps**


1️⃣

2️⃣
### ** Knapsack Problem (0/1 or Fractional)**

3️⃣
### ** Quick Sort – Dry Run**

4️⃣
### ** Binary Search (algorithm + recurrence)**

5️⃣
### ** Master Theorem Problems**

6️⃣
### ** DFS / BFS + Draw Tree**

7️⃣
### ** Matrix Chain Multiplication (DP)**

8️⃣
### ** Huffman Coding**

9️⃣
### ** P–NP–NP Hard / NP Complete explanation**

### **🔟 String Matching (Naive or Rabin-Karp)**

1️⃣
1️⃣ **1️⃣1️⃣ Backtracking (4 Queens)**
###

1️⃣
2️⃣ **1️⃣2️⃣ Spurious Hits (Rabin–Karp)**
###

---

# ✅ **Exam-Focused Tricks (“Golden Points”)**

These small topics get repeated like a pattern:

| Trick Topic | Why Asked? |


| ------------------------------ | ----------------------- |
| Big-O, Ω, Θ differences | Appears every paper |
| Principle of Optimality | Repeat topic |
| Articulation point | Very common |
| Recurrence relations | Always 7 marks |
| Counting/Bucket Sort | Seen often |
| Dynamic programming advantages | Always 4 marks |
| Types of graphs | Short repeated question |

---

# ✅ Want Full Notes + Expected Answers PDF?

I can prepare:

✔ Chapter-wise expected questions


✔ Answers written in exam format
✔ Coding examples
✔ Diagrams included

Just tell me: **“Yes, make PDF”**

---
If you want, I can also prepare:

📚 **Unit-wise 70-mark Paper Guess**


💡 **Important coding questions list**
🎯 **Last 2-day revision plan**

Would you like that?

Common questions

Powered by AI

Java is considered platform-independent because of its bytecode and the Java Virtual Machine (JVM). When Java source code is compiled, it is converted into bytecode that can be run on any system with a JVM, regardless of the underlying architecture .

An abstract class in Java can have both abstract and concrete methods and is used when classes share a common design but differ in details. An interface, on the other hand, can only have abstract methods (though default methods were introduced in Java 8) and is used to define a contract that must be fulfilled by implementing classes. Abstract classes can have state (fields), while interfaces cannot. Interfaces support multiple inheritance, while abstract classes do not .

To implement a custom exception in Java, you create a class that extends the Exception class for checked exceptions or RuntimeException for unchecked exceptions. This custom exception can provide specific detail messages and methods for handling exceptional situations particular to the application's domain, thus improving error handling precision and offering a mechanism for managing user-defined conditions effectively .

Java achieves inter-thread communication through methods like `wait()`, `notify()`, and `notifyAll()`, which are part of any object's monitor. This mechanism allows one thread to suspend execution until another thread gives it a signal to proceed. It is crucial for implementing efficiently synchronized work-flows among threads, where threads can share resources or notify each other of changes in state, minimizing resource contention and leading to better performance and reliability in concurrent applications .

The 'static' keyword in Java signifies that a particular member belongs to the class rather than instances of the class. This means that static members are shared across all instances and can be accessed without creating an object of the class. For example, static variables can keep track of the number of objects created if incremented in a constructor, and static methods, such as `Math.pow()`, can be called without referring to an instance .

Java does not support multiple inheritance with classes to avoid the problem of the 'diamond of death,' where a subclass inherits from multiple superclasses with potential method conflicts. However, Java allows multiple inheritance through interfaces, as they provide a way to implement multiple contracts without the issues associated with multiple superclass inheritance. This allows a class to interact with numerous interfaces, offering flexibility and a form of multiple inheritance without ambiguity .

Synchronization in Java is a mechanism that ensures that only one thread can access a resource at a time. It is crucial in multithreaded programming to prevent thread interference and memory consistency errors. By using synchronized methods or blocks, Java provides a way to control the access of multiple threads to any shared resource, ensuring that critical sections of code are executed by only one thread at a time .

In Java, checked exceptions are exceptions that must be either caught or declared in the method where they can occur, such as IOException. These happen at compile-time. Unchecked exceptions, like NullPointerException, are not checked at compile-time but occur at runtime, often because of programming errors like logical mistakes. Checked exceptions are meant for recoverable conditions, while unchecked ones generally represent errors in the program's logic .

In Java, the 'super' keyword is used in multilevel inheritance to call the constructor of the superclass. This is essential because, in a class hierarchy, constructors are called from the base class upwards to the derived class. When a subclass constructor is called, it implicitly invokes the constructor of its superclass with 'super', although a specific use of 'super' can explicitly control which superclass constructor is called .

Method overloading in Java refers to defining multiple methods with the same name but different parameters (type, number, or order). It allows methods to perform similar behavior using different input parameters, enhancing polymorphism and readability. For example, an overloaded method `add(int a, int b)` and `add(double a, double b)` can handle integer and double addition without changing the method name, thus providing flexibility .

You might also like