Skip to content

This repository provides a set of lightweight Java utility packages designed to simplify common programming tasks. Instead of repeatedly writing boilerplate code, these utilities allow developers to work more efficiently and keep their projects clean and readable. The focus is on providing beginner-friendly components that can be easily integrated.

Notifications You must be signed in to change notification settings

PareekshithPalat/Java-Simplifier-Packages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Java-Simplifier-Packages

Here are some simple Java packages to make your life easier and Java-friendly

1) The Arraysorter

The Arraysorter class is designed to sort an array of integers using the Bubble Sort algorithm. This basic sorting algorithm repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order.

usage

   ArraySorter sorter = new ArraySorter(data);

2) PrintUtil

The PrintUtils package is for simplifying the print statement where by using this package the user won't have to enter the old traditional print statement :

   System.out.print("hello world");

instead, you can download this file and import the package by :

For Simple print() function

   import static PrintUtil.print;

For Simple println() function

   import static PrintUtil.println;

For simple printf() function

   import static PrintUtil.printf;

Now you can easily use the new print function and then print the output . Example code :

import static PrintUtil.print;
import static PrintUtil.println;
import static PrintUtil.printf;

public class Main {
    public static void main(String[] args) {
        // Now you can use print(), println(), and printf() directly
        print("This is using print(). ");
        println("This is using println().");
        printf("This is using printf(): %d", 100);
    }
}

3) PalindromeChecker

The PalindromeChecker package provides a simple way to check if a given string is a palindrome.
A palindrome is a word, phrase, or sequence that reads the same backward as forward (e.g., madam, malayalam, racecar).

Usage

First, import the package:

import PalindromeChecker;

Then, call the method in your code:

public class Main {
    public static void main(String[] args) {
        String word1 = "malayalam";
        String word2 = "hello";

        System.out.println(PalindromeChecker.isPalindrome(word1)); // true
        System.out.println(PalindromeChecker.isPalindrome(word2)); // false
    }
}

Example Output

true
false

Note: Adjust the package name in the import statement based on where you place the PalindromeChecker class.


About

This repository provides a set of lightweight Java utility packages designed to simplify common programming tasks. Instead of repeatedly writing boilerplate code, these utilities allow developers to work more efficiently and keep their projects clean and readable. The focus is on providing beginner-friendly components that can be easily integrated.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages