Assignments: Java

Java Assignment 01:

  1. State a few important properties of Java.
  2. Find the difference between C++ and Java
  3. State any five applications written in Java
  4. Explain the process of compilation and interpretation in Java

Java Assignment 02:

  1. Write a program to check if the given number is odd or even
  2. Write a program to check if the given number is a multiple of 3 OR 4 or not
  3. Write a program to check if the given number is a multiple of 3 AND 4 or not
  4. Write a program to find the largest of two numbers using if else
  5. Write a program to find the largest of three numbers using if else

Java Assignment 03:

  • Create two singly linked lists L1 and L2 and perform the following operations on it:
    • Check if the length of both lists is the same or not.
    • Check if both lists are identical (return true if they are same, false otherwise).
    • Find the maximum element from both lists.
    • Append the second list at the end of the first list.
    • The last node of which list contains the greater value?

Java Assignment 04:

  • Implement Bubble sort, Selection sort and Insertion sort on data {‘C’, ‘B’, ‘D’, ‘A’, ‘F’, ‘E’}
  • Test your algorithm for the best case (sorted sequence), worst case (inversely sorted sequence) and average case (random sequence) of the input data and count the number of comparisons and swaps made by all three algorithms