Princeton1/clients/src/main/java/com/hithomelabs/clients/module5/InsertionClient.java
hitanshu310 90f8b14ee5
All checks were successful
sample gradle build and test / build (pull_request) Successful in 55s
sample gradle build and test / build (push) Successful in 49s
Mode commonly used objects to a new module common, added dependencies and test dependencies for other modules on common, added Merge sort, client and tests
2025-02-04 02:15:31 +05:30

29 lines
674 B
Java

package com.hithomelabs.clients.module5;
import com.hithomelabs.princeton1.module5.Insertion;
import com.hithomelabs.princeton1.common.Apple;
import com.hithomelabs.princeton1.common.Orange;
public class InsertionClient {
public static void main(String[] args){
Apple[] apples = new Apple[3];
Orange[] oranges = new Orange[3];
Insertion<Apple> insertion = new Insertion<>();
apples[0] = new Apple(3);
apples[1] = new Apple(5);
apples[2] = new Apple(4);
insertion.sort(apples);
//* * Sample output
for (int i = 0; i < apples.length; i++)
System.out.println(apples[i]);
}
}