This repository contains solutions to 12 basic Java programming problems, providing a foundational understanding of essential Java concepts such as loops, arrays, and conditionals.Each problem is solved with detailed code and try to implement the programming logic.
- IntelliJ
-
Here is the 10 students CGPA [3.50, 3.52, 3.43, 3.63, 3.48, 3.32, 3.30, 3.60, 3.86, 3.75]. Find out who achieved the 2nd highest score. (without sorting, use linear searching algorithm)
-
Sort the above scores from according to the order of highest CGPA (don’t use Arrays.sort() method, do it programmatically)
-
Take a CGPA as user input. Now from the given array find if your input CGPA is present using binary search algorithm
-
Generate random 10 integer numbers in an array and print out all the numbers from the array and also print the max and min number from the array.
-
Write a program that will break down the amount and count notes for any given amount. Here is the notes in the given array:notes=[1000,500,200,100,50,20,10,5,2,1] Input: 546 Output: 500 1 20 2 5 1 1 1
-
Write a program that will give following output:
12345
1234
123
12
1 12
123 1234 12345 -
Take input as height of 10 babies in cm. Now find out the 2 lowest height of babies. (Don’t use Arrays.sort() method)
-
Count number of words, number of characters without spaces, number of vowels and consonant from the given string: Input: I am a SQA Engineer Output: Words: 5 Chars: 15 Vowel: 8 Consonant: 7
-
Find the number of occurrences of characters in a String String: I live in Dhaka Output: i 3 l 1 v 1 e 1 d 1 h 1 a 2 k 1
-
Print the numbers which are not duplicate from the given array. numbers=[1, 1, 2, 3, 1, 2, 4, 5, 6, 5, 4, 7] Output: 3, 6, 7
-
Write a program that will take integer numbers as user input continuously and print the sum of numbers until user input q from the keyboard. When user input q, the program will be quit. If the user inputs another character, then the program will ask to input the number again.
-
A core i 7 laptop price is 85000 tk and a gaming mouse price is 2500 tk. If I buy the laptop and 1 piece mouse, what will be my total cost after giving 15% discount? [Extract the digits from the paragraph and calculate the price]