Contents
|
Prg
|
Program Statement
|
Download
|
1
|
Write a Java program that prints all real solutions to the quadratic equation
ax2 + bx + c = 0. Read in a, b, c and use the quadratic formula. If the discriminant (b2– 4ac) is negative; display a message stating that there are no real solutions.
|
|
2
|
The Fibonacci sequence is defined by the following rule: The first two values in the sequence are 0 and 1. Every subsequent value is the sum of the two values preceding it. Write a Java program that uses both recursive and non-recursive functions to print the nth value in the Fibonacci sequence.
|
CLICK HERE
|
3
|
Write a Java program that prompts the user for an integer and then prints out all prime numbers up to that integer.
|
|
4
|
Write a Java program that checks whether a given string is a palindrome or not. For example, “MADAM” is a palindrome.
|
|
5
|
Write a Java program for sorting a given list of names in ascending order.
|
|
6
|
Write a Java program to multiply two given matrices.
|
|
7
|
Write a Java Program that reads a line of integers, and then displays each integer, and the sum of all the integers (use StringTokenizer class).
|
|
8
|
Write a Java program that reads a file name from the user then displays information about whether the file exists, whether the file is readable, whether the file is writable, the type of file and the length of the file in bytes.
|
|
9
|
Write a Java program that reads a file and displays the contents of the file on the screen, with a line number before each line.
|
|
10
|
Write a Java program that displays the number of characters, lines and words in a text file.
|
|
11
|
Write a Java program for creating multiple threads.
(a) Using Thread class
(b) Using Runnable interface
|
|
12
|
Write a Java program that illustrates how run time polymorphism is achieved.
|
|
|
|
|