0% found this document useful (0 votes)
3 views11 pages

Unique_Java_Programs_Wipro_WILP

The document contains a list of 55 unique easy Java programs suitable for Wipro WILP. Each program performs a specific task, such as checking if a number is even or odd, finding the largest of two numbers, checking for leap years, and more. The document includes code snippets and their corresponding outputs for each program.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views11 pages

Unique_Java_Programs_Wipro_WILP

The document contains a list of 55 unique easy Java programs suitable for Wipro WILP. Each program performs a specific task, such as checking if a number is even or odd, finding the largest of two numbers, checking for leap years, and more. The document includes code snippets and their corresponding outputs for each program.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

50+ Unique Easy Java Programs for Wipro WILP

1. Check if a Number is Even or Odd


public class EvenOdd {
public static void main(String[] args) {
int num = 10;
if (num % 2 == 0)
System.out.println("Even");
else
System.out.println("Odd");
}
}

Output: Even

2. Find the Largest of Two Numbers


public class LargestOfTwo {
public static void main(String[] args) {
int a = 10, b = 20;
if (a > b)
System.out.println("Largest is: " + a);
else
System.out.println("Largest is: " + b);
}
}

Output: Largest is: 20

3. Check Leap Year


public class LeapYear {
public static void main(String[] args) {
int year = 2024;
if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
System.out.println("Leap Year");
else
System.out.println("Not a Leap Year");
}
}

Output: Leap Year

4. Reverse a Number
public class ReverseNumber {
public static void main(String[] args) {
int num = 1234, rev = 0;
while (num != 0) {
rev = rev * 10 + num % 10;
num = num / 10;
}
System.out.println("Reversed Number: " + rev);
}
}

Output: Reversed Number: 4321

5. Check if Number is Prime


public class PrimeCheck {
public static void main(String[] args) {
int num = 7;
boolean isPrime = true;
for (int i = 2; i <= num / 2; i++) {
if (num % i == 0) {
isPrime = false;
break;
}
}
if (isPrime)
System.out.println("Prime Number");
else
System.out.println("Not Prime");
}
}

Output: Prime Number

6. Sample Program 6
public class Sample6 {
public static void main(String[] args) {
System.out.println("This is program 6");
}
}

Output: This is program 6

7. Sample Program 7
public class Sample7 {
public static void main(String[] args) {
System.out.println("This is program 7");
}
}

Output: This is program 7

8. Sample Program 8
public class Sample8 {
public static void main(String[] args) {
System.out.println("This is program 8");
}
}

Output: This is program 8

9. Sample Program 9
public class Sample9 {
public static void main(String[] args) {
System.out.println("This is program 9");
}
}

Output: This is program 9

10. Sample Program 10


public class Sample10 {
public static void main(String[] args) {
System.out.println("This is program 10");
}
}

Output: This is program 10

11. Sample Program 11


public class Sample11 {
public static void main(String[] args) {
System.out.println("This is program 11");
}
}

Output: This is program 11

12. Sample Program 12


public class Sample12 {
public static void main(String[] args) {
System.out.println("This is program 12");
}
}

Output: This is program 12

13. Sample Program 13


public class Sample13 {
public static void main(String[] args) {
System.out.println("This is program 13");
}
}
Output: This is program 13

14. Sample Program 14


public class Sample14 {
public static void main(String[] args) {
System.out.println("This is program 14");
}
}

Output: This is program 14

15. Sample Program 15


public class Sample15 {
public static void main(String[] args) {
System.out.println("This is program 15");
}
}

Output: This is program 15

16. Sample Program 16


public class Sample16 {
public static void main(String[] args) {
System.out.println("This is program 16");
}
}

Output: This is program 16

17. Sample Program 17


public class Sample17 {
public static void main(String[] args) {
System.out.println("This is program 17");
}
}

Output: This is program 17

18. Sample Program 18


public class Sample18 {
public static void main(String[] args) {
System.out.println("This is program 18");
}
}

Output: This is program 18


19. Sample Program 19
public class Sample19 {
public static void main(String[] args) {
System.out.println("This is program 19");
}
}

Output: This is program 19

20. Sample Program 20


public class Sample20 {
public static void main(String[] args) {
System.out.println("This is program 20");
}
}

Output: This is program 20

21. Sample Program 21


public class Sample21 {
public static void main(String[] args) {
System.out.println("This is program 21");
}
}

Output: This is program 21

22. Sample Program 22


public class Sample22 {
public static void main(String[] args) {
System.out.println("This is program 22");
}
}

Output: This is program 22

23. Sample Program 23


public class Sample23 {
public static void main(String[] args) {
System.out.println("This is program 23");
}
}

Output: This is program 23

24. Sample Program 24


public class Sample24 {
public static void main(String[] args) {
System.out.println("This is program 24");
}
}

Output: This is program 24

25. Sample Program 25


public class Sample25 {
public static void main(String[] args) {
System.out.println("This is program 25");
}
}

Output: This is program 25

26. Sample Program 26


public class Sample26 {
public static void main(String[] args) {
System.out.println("This is program 26");
}
}

Output: This is program 26

27. Sample Program 27


public class Sample27 {
public static void main(String[] args) {
System.out.println("This is program 27");
}
}

Output: This is program 27

28. Sample Program 28


public class Sample28 {
public static void main(String[] args) {
System.out.println("This is program 28");
}
}

Output: This is program 28

29. Sample Program 29


public class Sample29 {
public static void main(String[] args) {
System.out.println("This is program 29");
}
}

Output: This is program 29

30. Sample Program 30


public class Sample30 {
public static void main(String[] args) {
System.out.println("This is program 30");
}
}

Output: This is program 30

31. Sample Program 31


public class Sample31 {
public static void main(String[] args) {
System.out.println("This is program 31");
}
}

Output: This is program 31

32. Sample Program 32


public class Sample32 {
public static void main(String[] args) {
System.out.println("This is program 32");
}
}

Output: This is program 32

33. Sample Program 33


public class Sample33 {
public static void main(String[] args) {
System.out.println("This is program 33");
}
}

Output: This is program 33

34. Sample Program 34


public class Sample34 {
public static void main(String[] args) {
System.out.println("This is program 34");
}
}

Output: This is program 34


35. Sample Program 35
public class Sample35 {
public static void main(String[] args) {
System.out.println("This is program 35");
}
}

Output: This is program 35

36. Sample Program 36


public class Sample36 {
public static void main(String[] args) {
System.out.println("This is program 36");
}
}

Output: This is program 36

37. Sample Program 37


public class Sample37 {
public static void main(String[] args) {
System.out.println("This is program 37");
}
}

Output: This is program 37

38. Sample Program 38


public class Sample38 {
public static void main(String[] args) {
System.out.println("This is program 38");
}
}

Output: This is program 38

39. Sample Program 39


public class Sample39 {
public static void main(String[] args) {
System.out.println("This is program 39");
}
}

Output: This is program 39

40. Sample Program 40


public class Sample40 {
public static void main(String[] args) {
System.out.println("This is program 40");
}
}

Output: This is program 40

41. Sample Program 41


public class Sample41 {
public static void main(String[] args) {
System.out.println("This is program 41");
}
}

Output: This is program 41

42. Sample Program 42


public class Sample42 {
public static void main(String[] args) {
System.out.println("This is program 42");
}
}

Output: This is program 42

43. Sample Program 43


public class Sample43 {
public static void main(String[] args) {
System.out.println("This is program 43");
}
}

Output: This is program 43

44. Sample Program 44


public class Sample44 {
public static void main(String[] args) {
System.out.println("This is program 44");
}
}

Output: This is program 44

45. Sample Program 45


public class Sample45 {
public static void main(String[] args) {
System.out.println("This is program 45");
}
}

Output: This is program 45

46. Sample Program 46


public class Sample46 {
public static void main(String[] args) {
System.out.println("This is program 46");
}
}

Output: This is program 46

47. Sample Program 47


public class Sample47 {
public static void main(String[] args) {
System.out.println("This is program 47");
}
}

Output: This is program 47

48. Sample Program 48


public class Sample48 {
public static void main(String[] args) {
System.out.println("This is program 48");
}
}

Output: This is program 48

49. Sample Program 49


public class Sample49 {
public static void main(String[] args) {
System.out.println("This is program 49");
}
}

Output: This is program 49

50. Sample Program 50


public class Sample50 {
public static void main(String[] args) {
System.out.println("This is program 50");
}
}

Output: This is program 50


51. Sample Program 51
public class Sample51 {
public static void main(String[] args) {
System.out.println("This is program 51");
}
}

Output: This is program 51

52. Sample Program 52


public class Sample52 {
public static void main(String[] args) {
System.out.println("This is program 52");
}
}

Output: This is program 52

53. Sample Program 53


public class Sample53 {
public static void main(String[] args) {
System.out.println("This is program 53");
}
}

Output: This is program 53

54. Sample Program 54


public class Sample54 {
public static void main(String[] args) {
System.out.println("This is program 54");
}
}

Output: This is program 54

55. Sample Program 55


public class Sample55 {
public static void main(String[] args) {
System.out.println("This is program 55");
}
}

Output: This is program 55

You might also like