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

Java Practicals List For Viva

Uploaded by

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

Java Practicals List For Viva

Uploaded by

gaytrip19
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

1 Write a java program to perform All Operator operations in a single program.

Write a program to perform arithmetic and bitwise operations by creating individual


2 methods and classes then create an object to execute the individual methods of each
operation.

Write a Java program that allows users to determine whether a given year is a leap year.
3 The program should provide clear feedback and allow users to check multiple years in
one short.

Write a Java program that prints all real solutions to the quadratic equation ax^2+bx+c =
4 0. Read in a, b, c and use the quadratic formula. If the discriminant b^2-4ac is negative,
display a message stating that there are no real solutions.

The Fibonacci sequence is defined by the following rule. The first 2 values in the
sequence are 1. Every subsequent value is the sum of the 2 values preceding it. Write a
5
Java program that uses both recursive and non-recursive functions to print the nth value
of the Fibonacci sequence.

Write a Java program that prompts the user for an integer and then prints out all the prime
6
numbers up to that integer using a do-while loop.

Write a Java program to find the length of the longest increasing subsequence in an
7
unsorted array.

Write a Java program to find the contiguous subarray within an array (containing at least
8
one number) that has the largest product.

Write a Java program for method overloading and constructor overloading for a simple
9 banking application. The program handles two main operations: crediting and debiting
amounts from a bank account.

Write a Java program to represent an abstract class for mobile specification(like


10
Processor, Ram, Camera).
Write a Java program to implement multiple inheritances which responsible for diamond
11
problem with classes.

Write a Java program to demonstrate method overriding and the super keyword for IT
company management system. (Design a base class Employee with a method getRole().
12
Create a subclass Manager that overrides getRole() to specify the role of a manager and
uses super to call the base class's method.)

13 Write a Java program to implement an interface for solution on Diamond Problem.

Write a Java program to create inner classes for College Management system.(Design
14
classes for students and courses.)

Write a Java program that displays the number of characters, lines, and words in a text. (
Design and implement a Java program that analyzes a given text. The program should
15
also be able to perform text processing operations such as converting the text to
uppercase or lowercase, removing Blank Space from both side.)

Write a Java program that checks if a given string is a palindrome and allows the user to
16
check multiple strings in one run.

Write a Java program that reads a line of integers and then displays each integer and the
17
sum of all integers. (Use String Tokenizer class)?

Write a Java program for creating a single try block with multiple catch blocks which
18 should handled Arithmetic, NullPointer, NumberFormat and IndexOutOfBound
Exception.

Write a program for multiple try blocks and multiple catch blocks including finally Block
19
to handled all Runtime Exception.
20 Write a Java program for the producer-consumer problem using Threads.

Write a Java program that design how to create a dynamic array using the ArrayList class
21
to store string elements and then print the contents of the array.

Write a Java program that implements add, search, and remove operations on an
22
ArrayList to manage a list of books.

You might also like