Skip to content

TEJ-1-8/JAVA_Programs

Repository files navigation

# JAVA_Programs

Module-1

  1. Program to read a number from the user and print whether it is positive or negative. posorneg.java
  2. Program to solve quadratic equations (use if, else if and else). QuadraticEquation.Java
  3. Take three numbers from the user and print the greatest number. GreatestThree.java
  4. Program that keeps a number from the user and generates an integer between 1 and 7 and displays the name of the weekday. Weekday.java
  5. Program that reads in two floating-point numbers and tests whether they are the same up to three decimal places. FloatingDigit.java
  6. Program that takes a year from user and print whether that year is a leap year or not. LeapYear.java
  7. Program to display the first 10 natural numbers. FirstnNatural.java
  8. Program to input 5 numbers from keyboard and find their sum and average. SumAverage.java
  9. Program in Java to display the multiplication table of a given integer. MultiplicationTable.java
  10. Program in Java to display the pattern like right angle triangle with a number. PrintPattern.java

Module-2

  1. Program to read two numbers and perform the arithmetic operations using method. Arithmetic.java
  2. Program that performs arithmetic with values of type char.
  3. Design a class to overload a method compare() to return the greater of two as follows: Compare.java void compare(int, int) void compare(char, char) void compare(String, String)
  4. Program that creates a class Account that stores a variable balance. The class has methods to start account, to deposit money, to withdraw money and tell the current balance amount. Account.java
  5. Program to implement a Book class that stores the details of a book such as its code, title and price (Use constructors to initialize the objects).
  6. Program to differentiate between static and non-static methods.
  7. Program to illustrate the usage of this, final and finalize.
  8. Program to implement the concept of dynamic method dispatch.
  9. Program to pass the variable length arguments.
  10. Program to show the overloading of constructures.
  11. Program to read the comman line arguments and print the total number of arguments and its values.

Module-3

  1. Program for sorting a given list of names in ascending order. ListSorting.java
  2. Program to multiply two given matrices.
  3. Program to find the maximum and minimum value in an array of size m passed as argument. ArrayMinMax.java
  4. Program to read and print an array of size n rows with variable column size. (Hint: Irregular Array). IrArray.java
  5. Program that copies contents of one array to another using length member. CopyArray.java
  6. Program to find element from an sorted array using binary search. (Hint: java.util.package)
  7. Program to delete duplicate elements from an array of size 5. RemoveDuplicate.java
  8. Program that reverses an array and stores it in the same array. ReverseArray.java
  9. Program to implement all String methods on a Input String.
  10. Program to convert a given integer array of size n into string.
  11. Program to read and print a given string using different methods.
  12. Program to reverse the words in a string.
  13. Program to read a string and replace all the vowels with a $ symbol.
  14. Program to count the number of occurrences of a search string in a given text string.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages