0% found this document useful (0 votes)
11 views

Java Sorted Question

The document outlines a comprehensive curriculum for Java programming, covering topics such as Java basics, object-oriented programming, data types, operators, decision-making, constructors, inheritance, exception handling, multithreading, and applets. It includes various questions and programming tasks from different semesters, emphasizing practical applications and theoretical concepts. The structure is divided into units that progressively build on Java concepts, making it suitable for learners at different levels.

Uploaded by

vawagav635
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Java Sorted Question

The document outlines a comprehensive curriculum for Java programming, covering topics such as Java basics, object-oriented programming, data types, operators, decision-making, constructors, inheritance, exception handling, multithreading, and applets. It includes various questions and programming tasks from different semesters, emphasizing practical applications and theoretical concepts. The structure is divided into units that progressively build on Java concepts, making it suitable for learners at different levels.

Uploaded by

vawagav635
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Java Sorted Question

Unit 1: Java Basics

1.1 Java Features and the Java Programming Environment, Object Oriented,
Compiled, Interpreted, Platform independent, Portable, Robust and Secure,
Dynamic.

• List any eight features of Java. (Summer 19)


• Explain any four features of Java. (Summer 22)
• Enlist any four features of java. (Summer 23)
• Enlist any four features of java. (Winter 24)
• State the significance of Java Virtual Machine (JVM) in the Java
programming environment. (Summer 24)
• Explain the concept of platform independence and portability with respect to
Java language. (Summer 19)
• Explain the concept of platform independence in Java and discuss how it is
achieved. Give example to illustrate the concept. (Summer 24)

1.2 Defining a class, creating object, accessing class members

o Define class and object. (Winter 19)


o Define the terms with example (Summer 23)
▪ Class,Object
o Define a class student with int id and string name as data members and a
method void SetData (). Accept and display the data for five
students. (Summer 19)
o Define a class circle having data members Pi and radius. Initialize and display
values of data members also calculate area of circle and display it. (Winter 19)
o Define a class employee with data members 'empid', 'name' and 'salary'.
Accept data for three objects and display it. (Winter 22)
o Define class Employee with members as id and salary. Accept data for five
employees and display details of employees getting highest salary. (Summer
24)
o Define a class employee having data members as emp_id, name and salary.
Accept and display the data for five employees. (Winter 24)

1.3 Java Tokens and Data types, Constants and Symbolic Constants, variables,
dynamic initialization, data types, array and string, scope of variable, typecasting,
and standard default values.

• Define type casting. Explain its types with syntax and example. (Winter 19)
• Describe type casting in java with example. (Summer 23)
• Explain implicit and explicit type conversion with example in detail. (Winter
23)
• Write a program to display ASCII value of a number. (Winter 23)
• Define array. List its types. (Winter 19)
• Define array. List its types. (Summer 24)
• Write down the syntax of array declaration, initialization. (Winter 23)
1.4 Operators and Expressions, Arithmetic Operators. Relational Operators, Logical
Operators, Increment and Decrement, Conditional Operators, Bit wise Operators,
Instance of Operators, Dot Operators, Operator precedence and associativity,
Evaluation of Expressions, Type conversions in expressions, Mathematical
Functions - min(),max), sqrt), pow), exp(), round(), abs).

• State any four relational operators and their use. (Winter 22)
• Enlist the logical operators in Java. (Summer 22)
• Enlist any two logical operators and two bitwise operators. (Winter 23)
• Explain any two logical operators in Java with example. (Winter 19)
• Describe instance Of and dot ( ) operators in Java with suitable example.
(Summer 19)
• Give the syntax and example for the following functions (Summer 22)
▪ min ()
▪ Sqrt ()
• Write a program using sqrt() and pow() to calculate the square root and power
of given number. (Winter 24)
• Write a program to accept four numbers from user using command line
arguments and print the smallest number. (Winter 24)
• Write a program to demonstrate the use of conditional operator and switch
case statement. (Winter 24)

1.5 Decision making and looping: If statement, if else statement, nested if else
statement, if else if ladder, the switch statement, nested switch statement, The
?:operator, The while statement, the Do while statement, the 'for' statement, break,
continue and return statement, nested loops, labeled loops, for-each version of the
for loop.

• Explain switch case and conditional operator in java with suitable example.
(Summer 22)
• Write a Jav a program to find out the even numbers from 1 to 100 using for
loop. (Summer 22)
• Write a program to check whether the given number is prime or not. (Winter
22)
• Write a program to find reverse of a number. (Winter 22)
• Write a program to print all the Armstrong numbers from 0 to 999. (Summer
23)
• Write a program to print all the Armstrong numbers from 0 to 999. (Summer
23)

Unit 2: Constructors, Methods, Access Control, Arrays, and Strings

• 2.1 Constructors and methods, types of constructors, nesting of methods,


argument passing the 'this' keyword, command line arguments, varargs:
variable-length arguments, garbage collection, finalize() method, the objgar
TEChA class.
o Define constructor. List its types. (Winter 19)
o Explain the types of constructors in Java with suitable example. (Summer 19)
o What is constructor? List types of constructor. Explain parameterized
constructor with suitable example. (Summer 22)
o Explain constructor with suitable example. (Winter 22)
o Define constructor. (Winter 23)
o What happens if you don't define any constructor in a class? Can you still
create objects of that class? Explain with example. (Summer 24)
o Explain the concept of argument passing and the usage of 'this' keyword in
Java give example to illustrate their usage and benefits. (Summer 24)
o State use of finalize() method with its syntax. (Summer 19)
o Give use of garbage collection in java. (Summer 23)
o Explain garbage collection mechanism in java with suitable example. (Winter
24)
o Explain the command line arguments with suitable example. (Summer 19)
o Write a program to accept four numbers from user using command line
arguments and print the smallest number. (Winter 24)
• 2.2 Visibility Control Public, Private, Protected, default, friendly private
Protected access.
o List access specifiers in Java. (Winter 19)
o List access specifiers in Java. (Winter 22)
o Explain any four visibility controls in Java. (Summer 22)
o Explain any four visibility controls in Java. (Summer 22)
o Enlist access specifier with syntax. (Summer 23)
o Enlist and explain four access specifiers in java. (Winter 24)
• 2.3 Arrays and Strings: Types of arrays. creating an array. strings. string classes
and string buffer, vectors, wrapper classes, enumerated types.
o Differentiate between String and String Buffer. (Winter 19)
o Write the difference between vectors and arrays. (any four points) (Summer
22)
o Differentiate between string class and string buffer class. Explain any four
methods of string class. (Summer 22)
o Differentiate between string and string buffer class (any four points) (Summer
23)
o List any four methods of string class and state the use of each. (Winter 19)
o Write a program to check whether the string provided by the user is
palindrome or not. (Winter 22)
o Write a program to add 2 integer, 2 string and 2 float values in a vector.
Remove the element specified by the user and display the list. (Winter 22)
o Write a program to create vector with five elements as (5, 15, 25, 35, 45).
Insert new element at 2nd position. Remove 1st and 4th element from
vector. (Winter 19)
o Explain any four methods of vector class with example. (Summer 23)
o Explain vector with the help of example. Explain any 3 methods of vector
class. (Winter 23)
o Compare array and vector. Explain elementAT() and addElement() methods.
(Winter 22)
o Name the wrapper class methods for the following: (Summer 19)
▪ (i) To convert string objects to primitive int.
▪ (ii) To convert primitive int to string objects.

Unit 3: Inheritance
• 3.1 Inheritance: concept of inheritance Types of Inheritance
o List the types of inheritances in Java. (Summer 19)
o List the types of inheritance which is supported by java. (Winter 22)
o Explain single and multilevel inheritance with proper example. (Summer 22)
• 3.2 Single Inheritance. multilevel Inheritance. Hierarchical Inheritance. method
and constructor overloading and overriding. dynamic method dispatch, final
variables, final methods. use of super. abstract methods and classes. static
members.
o Differentiate between method overloading and method overriding. (Summer
19)
o Differentiate between method overloading and method overriding. (Winter 23)
o Explain dynamic method dispatch in Java with suitable example. (Summer 19)
o Explain the concept of Dynamic method dispatch with suitable example.
(Summer 19)
o Explain dynamic method dispatch mechanism with suitable example. (Winter
24)
o State the use of final keyword with respect to inheritance. (Winter 22)
o Write the use of 'Final' key word with suitable example. (Winter 24)
o Implement the following inheritance. (Winter 19)
▪ Interface: Salary
▪ Basic...
o Develop a program to create a class 'Book' having data members 'author', 'title'
and 'price'. Derive a class 'BookInfo' having data member 'stockposition' and
method to initialize and display the information for three objects. (Winter 22)
o Write a program to implement the following inheritance. Refer Fig. No. 1.
(Summer 23)
▪ Interface: Exam
▪ Sports mark = 20;
▪ Class: Student
▪ Roll no, S-name
▪ m1, m2, m3
▪ Class: Result
▪ display ()
o Implement the following inheritance. Refer Fig. No. 01. (Summer 24)
▪ Interface: Salary
▪ class: Employee
▪ Basic-Salary
▪ Basic-Sall()
▪ Name, age
▪ Display()
▪ Class: Gross - Salary
▪ TA
▪ DA, HRA
▪ Total-Sal()
• 3.3 Interfaces: Define Interface, implementing interface, accessing interface,
variables and methods. extending interfaces, interface references, nested
interfaces
o Define the interface in Java. (Summer 22)
o Define interface in java with suitable example. (Summer 23)
o Define the interface in Java. Write the syntax. (Summer 24)
o Differentiate between class and interfaces. (Winter 19)
o Define Packages. How to create user defined package? Explain with example.
(Winter 19)
o How to create user defined package in Java. Explain with an suitable example.
(Summer 22)
o Give a syntax to create a package and accessing package in java (Summer 23)
o Explain how to create a package and how to import it. (Summer 22)
o Describe the package in java with suitable example. (Summer 23)
o Explain how to create a package and import it with suitable example. (Winter
24)

Unit 4: Errors and Exception Handling, Multithreading

• 4.1 Errors and Exception :Types of errors, exceptions, try and catch statement,
nested try statement, throws and Finally statement, build-in exceptions, chained
exceptions, creating own exception(throw clause), subclasses.
o Define error. List types of error. (Winter 19)
o Enlist any four compile time errors. (Summer 22)
o Explain exception handling mechanism. w.r.t. try, catch, throw and finally.
(Summer 22)
o Define exception. State built-in exceptions. (Winter 19)
o Write a program to create a user defined exception in java. (Summer 23)
o Define an exception called 'No Match Exception' that is thrown when the
password accepted is not equal to 'MSBTE'. Write the program. (Winter 22)
o Write a program that throws an exception called "NoMatchException" when a
string is not equal to "India". (Winter 23)
o Define exception called 'No Match Exception' that is thrown when the
password accepted is not equal to 'MSBTE'. Write the program. (Summer 24)
o Write a program to create user defined exception "MIN-BAL". Throw the
exception when balance in account is below 500 rupees. (Winter 24)
o i) Explain Errors and its types in detail. (Winter 23)
• 4.2 Multithreaded Programming Creating a Thread: By extending to thread
class and by implementing runnable Interface. Life cycle of thread: Thread
Methods: wait, sleep), notify), resume(), suspend), stop().Thread exceptions.
thread priority and methods, synchronization, inter-thread communication.
deadlock.
o Explain the two ways of creating threads in Java. (Summer 19)
o Define thread. Mention 2 ways to create thread. (Winter 22)
o Define Thread. Draw life cycle of Thread. (Winter 23)
o Explain life cycle of thread. (Winter 19)
o Describe Life cycle of thread with suitable diagram. (Winter 22)
o Explain the applet life cycle with neat diagram. (Summer 23)
o Explain thread life cycle with neat diagram. (Summer 23)
o Draw and explain life cycle of Thread. (Summer 22)
o Draw and explain life cycle of thread. (Winter 24)
o Give a syntax of following thread method (Summer 23)
▪ i) Notify()
▪ ii) Sleep()
o Write a program to create two threads. One thread will display the numbers
from 1 to 50 (ascending order) and other thread will display numbers from 50
to 1 (descending order). (Summer 19)
o Write a program to create two threads one thread will print even no. between 1
to 50 and other will print odd number between 1 to 50. (Winter 19)
o Write a Java program in which thread A will display the even numbers
between 1 to 50 and thread B will display the odd numbers between 1 to 50.
After 3 iterations thread A should go to sleep for 500 ms. (Summer 22)
o Write a program to print even and odd number using two threads with delay of
1000ms after each number. (Summer 23)
o Write a program to create two threads. One thread will display the odd
numbers from 1 to 50 and the other thread will display the even numbers.
(Winter 24)
o Define thread priority ? Write default priority values and the methods to set
and change them. (Winter 22)
o ii) Explain thread methods to set and get priority. (Winter 23)
o Differentiate between starting thread with run() method and start() method.
(Winter 23)

Unit 5: Introduction to Applets

• 5.1 Introduction to applets: Applet, Applet life cycle (skeleton), Applet tag,
Adding Applet to HTML file. passing parameter to applet, embedding < applet>
tags in java code, adding controls to applets.
o Give the syntax of < param tag to pass parameters to an applet. (Summer 19)
o Give a syntax of (param) tag to pass parameters to an applet. (Summer 23)
o Give the use of <PARAM> tag in applet. (Summer 24)
o Write a program to accept username in the form of parameter and print "Hello
<username>". (Winter 19)
o Mention the steps to add applet to HTML file. Give sample code. (Winter 22)
o Explain applet life cycle. (Winter 19)
o Explain the applet life cycle with neat diagram. (Summer 23)
o Explain Applet life cycle in detail. (Winter 23)
o Explain Life Cycle of the applet with neat diagram. (Summer 24)
o Explain life cycle of an Applet with suitable example. (Winter 24)
o State the classes that can an applet extend. (Winter 23)
• **5.2 Graphics Programming: Graphics classes, lines, rectangles, ellipse, circle, arcs.
polygons, color and fonts, setColor(), getColor(), setForeGround(), setBack

You might also like