Java Assignment 1
Java Assignment 1
Title Page No
N
1 WAP to sort the elements of an array in ascending order.
2 WAP to find the transpose of a given matrix.
3 How to reverse a given String? (Without using a pre-defined function)
4 WAP to How do you check if a given String is Palindrome or not
Create a package mca1 which will have 2 classes as class Mathematics
5 with a methods to add two numbers, add three float numbers and class
Maximum with a method to find maximum of three numbers.
6 Write a Java program to create Animal interface that contains run() and
eat() method. And implement methods in Dog and Cat class.
Write a Java program to create an abstract class Animal that contains
7 non abstract run() and abstract eat() method…Derive two classes Dog
and Cat from it.
8 Write a Java program to test any five of standard exception
9 User-defined exception