Solved Programs
Step-by-step programming solutions with detailed explanations for all important topics.
ISC Computer Practical programs
Series programs 3
https://wordpress-343193-1101484.cloudwaysapps.com/pattern-programs-in-java-4
Series programs part 2
Write a program to print the following series.
ISC 2020 solved program (Object passing as an argument)
import java.util.*; class Mix { scanner sc=new scanner(system.in); int len; string wrd; Mix() { len=0; wrd=""; } void feedword() { system.out.println("enter a word"); wrd=sc.next(); } void mix_word(mix a, mix b) { st
ISC 2012 Object passing program
A class Combine contains an array of integers which combines two arrays into a single array including the duplicate elements, if any, and sorts the combined array. Some of the members of the class are given below:
Programs for beginners class IX
Write a menu driven program using switch case statement that outputs the results of the following evaluation based on the number entered by the user
Java programs for beginners
A computer salesman gets commission on the following basis:Sales Commission RateRs. 0 - 20,000 3%Rs. 20,000 - 50,000 12%Rs. 50,001 and more 31%Write a program to accept the sales as input, calculate and print his
Binary search with Recursion
Java Programs for beginners
Write a program to, compute the railway fare depending on the criteria as given
Fascinating Number program Solved ISC practical 2021 Question 1
Solved ISC practical 2021 Question 3
Saddle point program
Write a program in Java to input the size of a square matrix from the user. Then allow the user to fill the matrix with integers. Now do the following:
Circular shift program
Circular shiftA class Circular has been signed to print a set of elements in a circular fashion. For example, if input is 1, 2,3,4 output should be:1,2,3,44,1,2,33,4,1,22,3,4,1Class name: CircularShiftData members/ instance variables:list[ ]: store the elementssize: to store the number of elements
ISC computer practical 2019 solved Question 2
Write a program to declare a single dimensional array al ] and a square matrix b[ ] ofsize N. where >2 and N<10. Allow the user to input positive integers into the single dimensional array Perform the following tasks on the matrix:(a) Sort the elements of the single dimensional array in ascending or
Initials of string : Recursive Program
A class Initials Print has been defined to print the initials of the name. Some of the members of the class are given below:Class name : InitialsPrintData members/instance variables:String initials : to store the initials of the nameMember functions:initialsPrint(): constructor to assign blank to in
ISC 2020 program: Convert day number to date
isc 2020 program Design a class Convert to find the date and the month from a given day number for a particular year. Example: If day number is 64 and the year is 2020, then the corresponding date would be: March 4, 2020 i.e. (31 + 29 + 4 = 64).Some of the members of the class are given below:
Words that start and end with a vowel program: ISC 2016 program
Write a program to accept a sentence which may be terminated by either’.’, ‘?’or’!’ only. The words may be separated by more than one blank space and are in UPPER CASE.
Circular Prime number : An easy ISC practical 2016
A number is said to be prime if it has only two factors I and itself.Example:131311113Hence, 131 is a circular prime.Test your program with the sample data and some random data:
Magic number program
Smith Number: simple & Easy
import java.io.*; class SmithNumber { static int s=0; public static int sumdig(int n) { if(n==0) { return 0; } else { int d=n%10; return(d+sumdig(n/10)); } } static int sum=0; public static in
Queue : An easy Data Structure in java
import java.io.*; public class Queue { int Q[]; int size; int front; int rear; Queue(int cap) { size = cap; Q = new int[size]; front = 0; rear = 0; } void insert(int v) { if(rear == size) { System.out.pr
Highly Effective Data Structure : Stack
import java.io.*; class Stack { static int ST[],size,top; Stack() { size=0; top=-1; } Stack(int cap) { size=cap; ST=new int[size]; top=-1; } static void push(int n) { if(top==size-1) { System.out.println("Overflow"); } else { top+=1; ST[top]=n; } } static int pop() { if(top==-1) { System.out.printl
Rotate a Matrix by 90 degree
import java.io.*; class RotateMatrix { int r; int Arr[][]; int NewA[][]; void fill_array()throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter the order of the matrix"); r=Integer.parseInt(
An authentic Adam Number program
import java.io.*; class Adam { static int rev(int num) { int rev=0; while(num!=0) { int rem=num%10; rev=rev*10+rem; num=num/10; } return rev; } static int sq(int a) { int sq_a=a*a
ISC 2018 Practical: Gold Bach Number Program
A Gold Bach number is a positive even integer that can be expressed as the sum of two odd primes.Note: All even integer numbers greater than 4 are Gold Bach numbers.Example:6 = 3 + 310 = 3 + 710 = 5 + 5Hence, 6 has one odd prime pair 3 and 3. Similarly, 10 has two odd prime pairs, i.e. 3, 7 and 5, 5
Sum of the digits: An intriguing Recursion program
import java.util.*; class Recur { int sum=0; int sumofdigits(int num) { if(num>0) { int r=num%10; sum+=r; sumofdigits(num/10); } return sum; } public static void main() { Scanner sc=new Scanner(Syst
A Strong MatRev program ISC 2019 Object passing
Design a class MatRev to reverse each element of a matrix. Example:
A Wonderful Hourglass Program
import java.io.*; class Hourglass { public static void main()throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter the row and column number for the matrix"); int r=Integer.parseInt(br.readLine());
A Sensational Circular Matrix program
import java.io.*; class Circular { public static void main()throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter the length of the double dimensions-rows&columns-- ONLY ONE DIGIT IS TO BE ENTERED FOR BOTH"); int r=Integer.
A complete program: Delete an element from an array
For String programs clickhttps://wordpress-343193-1101484.cloudwaysapps.com/string-programs-part-5
A Brilliant Program: Insert an element into an array
For String programs clickhttps://wordpress-343193-1101484.cloudwaysapps.com/count-no-of-palindrome-words-in-a-sentence
An Awesome program: Common elements in two arrays
import java.io.*; class common { public static void main()throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter the size of the first array"); int n=Integer.parseInt(br.readLine()); int Arr1[]=new int[n]; System.out.println("Ente
A priceless Frequency of element in an array program
For more programshttps://wordpress-343193-1101484.cloudwaysapps.com/count-words-start-and-end-with-a-vowel
A superb Pendulum array program
For other posts related to array click https://wordpress-343193-1101484.cloudwaysapps.com/array-programs-part-1-icse-computer-applications
Interesting Merge two array program
import java.io.*; class merge { public static void main()throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter the length of the first array"); int n=Integer.parseInt(br.readLine()); int Arr1[]=new int[n]; System.out.println("En
Operators in JAVA: Learn in an easy way
class operators { public static void main() { int a=10; int b=2; int sum=a+b; int subtract=a-b; int product=a*b; int divide=a/b; int modulus=a%b; System.out.println("The sum is "+sum); System.out.println("The minus of a & b is "+subtract); System.out.printl
A beautiful Pythagorean Triple Program
For Java tutorials click the linkhttps://wordpress-343193-1101484.cloudwaysapps.com/wrapper-classes-in-java
A delightful Automorphic number
For other java programs clickhttps://wordpress-343193-1101484.cloudwaysapps.com/patterns-part-4strings
A dazzling Armstrong Number Program
import java.io.*; public class ArmstrongNumber //number = the sum of the cubes of the digits e.g., 153 { public static void main() throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter a number"); int num=Integer.parseI
An Efficient Kaprekar Number
For string programs click the given link https://wordpress-343193-1101484.cloudwaysapps.com/string-programs-part-5
An easy Pronic Number Program
import java.io.*; class pronic //the product of consecutive integers e.g., 72, 110 { public static void main()throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out .println("Enter a number"); int num=Integer.parseInt(br.readLine()); i
An Effortless program Special Number
Write a program to accept a number and print whether it is a special number or not.
A basic Keith Number Program
For example M = 197 is a keith number because, 197 has 3 digits, so n = 3 The number(197)appears in the special sequence that has first three terms as 1, 9, 7 and remaining terms evaluated using sum of previous 3 terms. 1, 9, 7, 17, 33, 57, 107, 197, …..
A simple program to use variable & Datatype
https://wordpress-343193-1101484.cloudwaysapps.com/data-type
Factorial of a number :Unleashed
For factorial of a number recursive program click the given link.
Fibonacci Series Program
For other basic java program click the given link. https://wordpress-343193-1101484.cloudwaysapps.com/solved-programs-class-9-beginner
Factorial of a number (Recursive Function)
To learn more about how to make a program in java watch this video https://youtu.be/TRm9r4gFTho
An easy Program: Transpose of a Matrix
To learn about how to take input in java watch the given video. https://youtu.be/QZKcULOC4lg
A Simple program: Sum of Boundary elements of a Matrix
Write a program to accept a matrix of any size from the user an print the sum of the boundary elements of the matrix.
A super Anticlockwise Circular Matrix program
import java.util.*; class AnticlockMatrix { public static void main(String args[]) { Scanner sc = new Scanner(System.in); System.out.print("Enter the size of the matrix: "); int n = sc.nextInt(); int A[][] = new int[n][n]; int k=n*n, c1=0, c2=n-1, r1=
An excellent String program to count words start and end with a vowel
import java.io.*; public class VowelWord { String str="",str2="",s="",st=""; int len,count=0; String arr[]; void input()throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("enter the string in upper case
An essential Julian Day Program
watch basic java videos herewww.youtube.com/user/trushntej
Count palindrome words in a sentence: Best program
Check some more java programs https://wordpress-343193-1101484.cloudwaysapps.com/julian-day-program
An Excellent ISBN Number program ISC practical 2013 [Question 1]
import java.io.*; public class IsbnNumber { public static void main()throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter a no of 10 digits"); int num=Integer.parseInt(br.readLine()); int sum=0,rem;double rev;
A deadly Duck Number
watch java videos here https://www.youtube.com/user/trushnatej
An effortless Bubble Sort & Binary Search
Check other java programs https://wordpress-343193-1101484.cloudwaysapps.com/count-no-of-palindrome-words-in-a-sentence(opens in a new tab)
String Program(Convert to palindrome words)
Write a program to accept a sentence and convert all the words in to palindrome words,the words that are already palindrome will remain same. Palindrome words are spelled same from both sides. Mom, dad, Malayalam are few examples of palindrome words.
Double Dimensional Array(Matrix) Program I (Maximum minimum element, sum, average)
String Programs part 5
import java.io.*; class WordPotential { public static void main()throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter a sentence"); String str= br.readLine(); str=str+" "; str=str.toUppe
String programs part 4
Write a program to input a sentence and print the frequency of the double occurrence characters.
Astonishing Java String Programs part-III
import java.io.*; class Extract { public static void main()throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter a word"); String wrd= br.readLine(); int len=wrd.length(); for (int i=0;i<
Lottery Program
The lottery program involves generating random numbers, comparing digits, and using Boolean operators. Suppose you want to develop a program to play lottery. The program randomly generates a lottery of a two-digit number, prompts the user to enter a two-digit number, and determines whether the user
Interface program
Write a java program to find the details of the students eligible to enroll for the examination ( Students, Department combinedly give the eligibility criteria for the enrollement class) using interfaces.
MCQ result program
Write a program that will grade multiple-choice tests. Assume there are eight students and ten questions, and the answers are stored in a two dimensional array. Each row records a student’s answers to the questions, as shown in the following array. Students’ Answers to the Questions: 0 1 2 3 4 5 6 7
Sudoku in java
Write a program to check whether a given Sudoku solution is correct or not .
Inheritance Abstract class program
Write a java program that implements educational hierarchy using inheritance. In this program abstract class is used. An abstract class can't be instantiated(you can't create an object of these classes). An abstract class is a class which has at least one abstract method. An abstract method can't ha
Robot(Inheritance of interfaces): an easy program
Create an abstract class Robot that has the concretre subclasses ,RobotA, RobotB, RobotC. Class RobotA1 extends RobotA, RobotB1 extends RobotB and RobotC1 extends RobotC. There is interface Motion that declares 3 methods forward(), reverse() and stop(), implemented by RobotB and RobotC. Sound interf
Interface program: An Exquisite program
Interface Luminious Object has two method lightOn() and lightOff(). There is one class Solid extended by 2 classes Cube and Cone. There is one class LuminiousCone extends Cone and implements Luminoius Interface. LumminuiousCube extends Cube and implements Luminious Interface. Create a object of Lumi
Inheritance of Interface: An upbeat program
Interface P is extended by P1 and P2 interfaces. Interface P12 extends both P1 and P2.Each interface declares one method and one constant.
Abstract class program
Write a java program to create an abstract class named Shape that contains two integers and an empty method named printArea(). Provide three classes named Rectangle, Triangle and Circle such that each one of the classes extends the class Shape. Each one of the classes contain only the method printAr
Java Project ATM Machine
java project atm machineUse the Account class created to simulate an ATM machine. Create 10 accounts with id AC001…..AC010 with initial balance 300₹. The system prompts the users to enter an id. If the id is entered incorrectly, ask the user to enter a correct id. Once an id is accepted, display me
Two strings having same sub string Program
string prrogram to find the substring from strings from the two given strings. if two consecutive letters are same they'll displayed. and the count will print.
Sum of left diagonal and right diagonal
Write a program to accept a two dimensional array(Square matrix) and calculate the sum of left and right diagonals.
Happy Number
Write a program to accept a number and check whether it is a happy number or not.
Twin Prime
Write a program to accept two numbers from the user and print whether they are twin prime number or not. A twin prime is a pair of two numbers that are both prime and their difference is two.
Frequency of letters
Write a program to accept a string and print the frequency of letters in the given format.
Niven and perfect number Solved program
Input a number to check for compositenumber or Niven number. Design a program to create a class perfect having two functions, one as composite(int a) another as Niven(int b)[A composite number has more than two factors]
A gripping String Bubble sort array program in java
import java.util.*; class StringLinearSearch { public static void main() { Scanner sc=new Scanner(System.in); System.out.println("Enter the size of array between 5 to 20"); int n=sc.nextInt(); String list[]=new String[n]; for(int i=0;i<n;i++) {
Armstrong Number with Recursion
Write a program to find the given number is Armstrong number or not with the help of a recursive function.
Disarium number Solved program
(Disarium number & reverse a number)
Loss percentage calculation program
Write a program to input cost price and selling price and calculate the loss percentage and print.
Calculate the Net bill program
Write a program to accept the total cost from the user. Calculate the discount and Net bill according the given rates. Print the details of the user.
Calculate the courier charges
Write a program to accept the weight of the parcel and calculate the bill according the given price slabs.
Binary Search
Write a program to search an element from the array using binary search technique.
Electricity Bill program
Write a program to input the number of units consumed. Calculate the Electricity bill according the given rates.
Series part 1
1. import java.io.*; class series1 { public static void main() { double num=0.5; System.out.print(num); for(int i=0;i<7;i++) { num+=5*Math.pow(10,i); System.out.print(", "+num); } } } o/p 0.5, 5.5, 55.5, 555.5, 5555.5, 55555.5, 555555.5, 5555555.5
Swapping numbers program
Write a program to swap two numbers using a temporary variable.
Evil number
Write a program to check whether the given number is Evil Number or not in Java A number is said to be an Evil number if and only if the binary equivalent of the number is having an even number of 1’s. The entered number must be a whole number.
Pattern programs in java part 4(Strings): learning made easy
A
Wondrous square program: ISC practical 2005 program
17 24 1 8 15
Unique number program
A unique-digit integer is a positive integer (without leading zeros) with no duplicate digits. For example 7, 135, 214 are all unique-digit integers whereas 33, 3121, 300 are not.
Solved Programs (class 9-Beginner Level)
import java.io.*; class salary { public static void main() throws IOException { BufferedReaderbr=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter your salary"); double basic_salary=Double.parseDouble(br.readLine()); String nam
Pattern programs in java part 3: Learning made easy
*
Pattern programs in java part 2 : Learning made easy
11111
Pattern programs in java part 1: Simple loop programs
111
An easy Caesar Cipher ISC Practical 2017 Program 3
Write a program to accept a plain text of length L, where L must be greater than 3 and less than 100. Encrypt the text if valid as per the Caesar Cipher. Test your program with the sample data and some random data: Example 1 INPUT : Hello! How are you?OUTPUT: Uryyb? Ubj ner lbh? Example
Basic Important Number programs for ICSE part-5
To learn more java programshttps://wordpress-343193-1101484.cloudwaysapps.com/string-programs-part-5
An inspiring Array Program
To learn more array programshttps://wordpress-343193-1101484.cloudwaysapps.com/sum-of-boundary-elements-of-a-matrix
Beautiful String programs in java part-II
For more programs https://wordpress-343193-1101484.cloudwaysapps.com/https-java4school-com-transpose_of_matrix
Number Programs in java part-4
for more java programs https://wordpress-343193-1101484.cloudwaysapps.com/double-dimensional-arraymatrix-programs-part-i
Intriguing String Programs part-1
for more string programs https://wordpress-343193-1101484.cloudwaysapps.com/count-words-start-and-end-with-a-vowel
Sorting Techniques : Thrilling Array Programs Part1
Bubble sort:- import java.io.*;class Bubblesort{public static void main()throws IOException{BufferedReader br=new BufferedReader(new InputStreamReader(System.in));System.out.println("enter the length of the array");int len=Integer.parseInt(br.readLine());int arr[]=new int[len];int temp=0;for(int i=0
Masterful Important Number programs ICSE part-3
For more programs https://wordpress-343193-1101484.cloudwaysapps.com/string-programs-part-iiiicse-computer-applications
Number Programs in java ICSE Part-2
import java.io.*;class palindrome{public static void main()throws IOException{BufferedReader br=new BufferedReader (new InputStreamReader(System.in));System.out.println("Give a number");int num=Integer.parseInt(br.readLine());int rem;int n=num;int rev=0;do{rem=num%10;rev=rev*10+rem;num=num/10;}while
Unleashed: Important Number Programs for ICSE Part-1
for other number programs click the link https://wordpress-343193-1101484.cloudwaysapps.com/duck-number