0% found this document useful (0 votes)
4 views4 pages

80 Java Coding Programs

The document outlines a technical training program focused on problem-solving using Java, divided into six phases. Each phase includes a series of programming tasks ranging from basic input/output operations to advanced data structures like linked lists and stacks. The tasks cover fundamental concepts such as control flow, arrays, strings, functions, recursion, and bit manipulation.
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)
4 views4 pages

80 Java Coding Programs

The document outlines a technical training program focused on problem-solving using Java, divided into six phases. Each phase includes a series of programming tasks ranging from basic input/output operations to advanced data structures like linked lists and stacks. The tasks cover fundamental concepts such as control flow, arrays, strings, functions, recursion, and bit manipulation.
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

CRC- Technical Training ( Problem Solving using Java )

Java Programs:
Phase 1: The Basics (Input, Output, & Operators)

1. Print "Hello, World!".

2. Read an integer/float/char and print it.

3. Swap two numbers using a temporary variable.

4. Swap two numbers without a temporary variable.

5. Convert temperature from Celsius to Fahrenheit (and vice versa).

6. Calculate Simple Interest and Compound Interest.

7. Calculate the area and circumference of a circle.

8. Check if a number is even or odd (using modulus operator).

9. Check if a number is even or odd (using bitwise operators).

10. Find the size of different data types (int, char, float, double) using sizeof.

11. Convert days into years, weeks, and days.

12. Calculate the ASCII value of a character.

Phase 2: Control Flow (Conditionals & Loops)

Conditionals (If/Else/Switch)

13. Find the largest of three numbers.

14. Check if a year is a leap year.

15. Check if a character is a vowel or consonant.

16. Find the roots of a quadratic equation.

17. Create a simple calculator using switch case.

18. Check if a character is an alphabet, digit, or special character.

Looping Logic (For/While/Do-While)

19. Calculate the factorial of a number.

20. Generate the Fibonacci sequence up to N terms.

21. Check if a number is a Prime number.

22. Print all Prime numbers between 1 and N.

23. Check if a number is a Palindrome (e.g., 121).


24. Check if a number is an Armstrong number (e.g., 153).

25. Check if a number is a Strong number (sum of factorial of digits = number).

26. Reverse a given integer.

27. Calculate the sum of digits of a number.

28. Find the GCD (HCF) and LCM of two numbers.

Pattern Printing (Visual Logic)

29. Print a half-pyramid of stars (*).

30. Print an inverted half-pyramid.

31. Print a full pyramid (triangle).

32. Print a diamond shape.

33. Print Pascal’s Triangle.

34. Print Floyd’s Triangle.

35. Print a number pyramid (1, 12, 123, etc.).

Phase 3: Arrays and Matrix Operations

36. Find the sum and average of array elements.

37. Find the largest and smallest element in an array.

38. Reverse an array in place (without a second array).

39. Insert an element at a specific position in an array.

40. Delete an element from a specific position.

41. Remove duplicate elements from an array.

42. Merge two arrays.

43. Rotate an array left or right by N positions.

44. Linear Search: Find an element in an array.

45. Binary Search: Find an element in a sorted array.

46. Bubble Sort: Sort an array in ascending order.

47. Selection Sort: Sort an array.

2D Arrays (Matrices)

48. Add two matrices.

49. Multiply two matrices (Classic problem).

50. Find the Transpose of a matrix.


51. Check if a matrix is symmetric.

52. Calculate the sum of diagonal elements.

53. Check if two matrices are equal.

Phase 4: Strings

54. Find the length of a string without using strlen.

55. Copy one string to another without strcpy.

56. Concatenate two strings without strcat.

57. Compare two strings without strcmp.

58. Reverse a string.

59. Check if a string is a Palindrome.

60. Count the number of vowels, consonants, digits, and spaces in a string.

61. Convert a string to lowercase/uppercase.

62. Sort a set of strings in alphabetical order.

63. Remove all characters in a string except alphabets.

64. Find the frequency of characters in a string.

Phase 5: Functions & Recursion

65. Create a function to check for Prime/Armstrong/Perfect numbers.

66. Call by Value vs. Call by Reference demonstration.

67. Find the factorial of a number using Recursion.

68. Find the GCD of two numbers using Recursion.

69. Solve the Tower of Hanoi problem.

70. Reverse a sentence using Recursion.

71. Calculate the power of a number using Recursion.

72. Find the sum of natural numbers using Recursion.

Phase 6: Advanced / Data Structures

73. Implement a Linked List (Insert, Delete, Display).

74. Reverse a Linked List.


75. Implement a Doubly Linked List.

76. Implement a Stack using Arrays.

77. Implement a Queue using Arrays.

78. Implement a Stack using Pointers (Linked List).

79. Check for balanced parentheses using a Stack.

80. Bit Manipulation: Check if the -th bit is set.

81. Bit Manipulation: Toggle the -th bit.

82. Count set bits in an integer.

You might also like