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

Java Lab Manual BCA 4 C and D

Uploaded by

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

Java Lab Manual BCA 4 C and D

Uploaded by

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

L.N.

Mishra College of Business


Management

JAVA LAB ASSIGNMENTS


BC-407
Dr. R S Soni

Bhagwanpur Chowk, Muzaffarpur, Bihar-842001


LAB - 1
Experiment 1: i) Installation of Java

ii) Installation o Editors for Java (VSCode or Eclipse or Edit Plus)

Experiment 2: Environment setup for Java

Experiment 3: Execute the first Programme in java.

LAB - 2
Experiment 4: Write a programme in java to print the values of all data types (int, char, long,
double, Boolean, String )

Experiment 5: Write a programme to print (i) sum (ii) Multiplication (iii) Division (iv) Remainder

(v) Subtraction

Experiment 6: Write a programme to add 2 Strings.

LAB - 3
Experiment 7: Write a programme in java to input a String using Command Line Arguments

Experiment 8: Write a programme to input values using Command Line Arguments and Type
caste the values in (int, long, float and double)

Experiment 9: Write a programme input values using Command Line Arguments and check that
the inputted number is even or odd

LAB - 4
Experiment 10: Write a programme in java to input 3 values using Command Line Arguments
print the greatest, middle and lowest

Experiment 11: Write a programme to input values of different data types using
Scanner class methods

Bhagwanpur Chowk, Muzaffarpur, Bihar-842001


Experiment 12: Write a programme input values using Scanner, create user’s choice Menu to
perform all arithmetical operations.

LAB - 5
Experiment 13: Input a number and print its table using for-loop.

Experiment 14: Input a number and print its factorial.

Experiment 15: Write a programme to print the sum of natural numbers .

LAB - 6
Experiment 16: Print

Experiment 17: Print

Experiment 18: Print

Experiment 19: Print

Bhagwanpur Chowk, Muzaffarpur, Bihar-842001


LAB - 7
Experiment 20: Print all Prime Numbers between 1 to n using wile-loop.

Experiment 21: Print the sum of all digits of a number.

Ex:- Input : 123

Output: 6

Experiment 22: Write a programme to print the GCD of 2 numbers.

LAB - 8
Experiment 23: Input 10 values in an array and print the sum of all values.

Experiment 24: Input 5 Values in array and sort the array using bubble or Insertion sort.

Experiment 25: Write a programme to print the Average of 25 Numbers Using array.

LAB - 9
Experiment 26: Input Values in an array and print greatest value using for-Each-loop.

Experiment 27: Input Values in 2D Array and print the Values using For-Each-Loop.

Experiment 28: Input Values in two 2D array and perform the Matrix Multiplication.

LAB - 10
Experiment 29: Input a number and print its table using for-loop.

Experiment 30: Input a number and print its factorial.

Bhagwanpur Chowk, Muzaffarpur, Bihar-842001


Experiment 31: Write a programme to print the sum of natural numbers.

LAB - 11
Experiment 32: Initialize the 2 Strings of a class using its constructor and print in main()
method.

Experiment 33: Initialize the String and int variables of a class using its Parameterized
constructor and print in main() method.

Experiment 34: Define a class method to print the Fibonacci series

LAB - 12
Experiment 35: Declare a method with two string parameters and match these strings.

Experiment 36: Declare a method with string parameter convert the string in to a char-array
and print the characters using for-each-loop.

Experiment 37: Pass a class into a method and add 3 complex numbers.

LAB - 13
Experiment 38: Define two methods in a class with same name in a class 1st method print the
sum of array the second method concatenate two strings.

Experiment 39: Define two methods in a class with same name 1st method return the greatest
value of an array the second method return the repeated string from
string array.

LAB - 14
Experiment 40: Define two methods in a class with same name in a class 1st method print the
sum of array the second method concatenate two strings.

Experiment 41: Define 3 classes each having a string use multilevel inheritance, concatenate
all strings in the method of third level class.

Experiment 42: Define package which have 2 classes and each having 2 methods, define
another package which have also 2 classes these classes inherit the

Bhagwanpur Chowk, Muzaffarpur, Bihar-842001


classes of 1st package and call their methods using the objects of the classes of
second package

LAB - 16
Experiment 43: Define an interface having 3 methods implement it in class and override the
methods.

Experiment 44: Define an interface (ConsoVowel) with the method name countVowels(String)
implements the interface in a class and count the vowels in a sentence.

Experiment 45: Write a java programme to convert List to Array

LAB - 17
Experiment 46: Input a sentence using BufferedReader class.

Experiment 47: Input 10 lines from user and write it in to the text file name user.txt.

Experiment 48: Read a text file from java programme and print it on console.

LAB - 18
Experiment 49: Create a frame of size 600 X 600, display the current date on frame .

Experiment 50: Create a Frame to move your name left to right using multithreading.

Experiment 51: Create a Frame to jump an oval using multithreading.

LAB - 19
Experiment 52: Write a java programme to connect with oracle data base.

Experiment 53: Create a Frame to input user name, password and email and insert it into the
userDetails table in oracle.

LAB - 20
A Mini Project

Bhagwanpur Chowk, Muzaffarpur, Bihar-842001

You might also like