Java Lab Manual BCA 4 C and D
Java Lab Manual BCA 4 C and D
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
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
LAB - 5
Experiment 13: Input a number and print its table using for-loop.
LAB - 6
Experiment 16: Print
Output: 6
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.
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.
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
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.
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.
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