Solved Programs:
- Java program to check for Pronic Number (Heteromecic Number)
- Java program to check for Harshad Number (Niven Number)
- Java program to find the GCD of two numbers (Division Method)
- Program to Remove Duplicate Characters from a Word
- Java Program to check for Disarium Number
- [Question 4] ICSE 2014 Paper Solved (movieMagic)
- Java Program to check if a number is in Fibonacci Series or not
- [Question 5] ICSE 2014 Paper Solved (Special 2-Digit No)
- [Question 6] ICSE 2014 Paper Solved (File Path Name)
- Java Program to check for Automorphic Number
- Program to Remove Consecutive Repeated Characters from a Word
- Program to find frequency of every digit in a number
- Program to find frequency of every alphabet in a String
- Program to check for Smith Number [ISC 2008 Practical]
- Program on Decimal to Hexadecimal Number Conversion
- Program on Decimal to Octal Number Conversion
- Program on Decimal to Binary Number Conversion
- Program to check for Duck Number
- [Question 6] ICSE 2013 Paper Solved (Piglatin Word)
- Swapping two Strings without using third variable
- Shortest and the Longest word in a Sentence [Method 1]
- Program for displaying the Denominations of an Amount
- Program to find the Prime Factors of a Number [Method 1]
- Program on Decimal to Roman Number Conversion [Method 2]
- Program on Decimal to Roman Number Conversion [Method 1]
- Program to find the LCM of two numbers [Method 2]
- Program to find the LCM of two numbers [Method 1]
- Printing the initials of a Name or First letters of each word of a Sentence
- Swapping two numbers without using third variable [Method 2]
- Swapping two numbers without using third variable [Method 1]
How to accept character value from user using Scanner??
What is the function used??
System.out.print(“Enter a character : “);
char ch = sc.next().charAt(0);
if we write what we understand than writing the perfect definition will we get complete marks
yes
In Character.isUpperCase(‘c’),what does ‘Character’ denote
Character is a wrapper class, just like Integerin Integer.parseInt()
nice one
How do we know whether we should print the inner loop variable ro the outer loop variable in a nested loop program?
If you want to print values which are same for any line and only changes when it goes to the next line, then print outer loop variable.
If you want to print values which are changing within the same line, then print inner loop variable.
Can we inherit a constructor
No
thank u you help me
In import java.io.*
What does ‘*’ indicates?
In the above statement, ‘*’ indicates “all classes”
What is implicit and explicit type casting?
(a) Implicit Type Conversion: When the conversion takes place on its own without the programmer’s intervention.
(b) Explicit Type Conversion: When the conversion takes place with the programmer’s intervention.
Why class in java is termed as a composite data type ?
Class is a user-defined / composite data type:
A class consists of data fields of one or more types representing the attributes of an object. Hence, it is a construct that binds one or more primitive types together to be used as a single data types. A class may be thought of as a ‘data type’ and an object as a ‘variable’ of that data type. It is designed by the programmer and thus, it is called user defined data types.
can hollow patterns be a part of the paper?
No
are 2d arrays important
2D arrays are not there in class 10 syllabus.
11111
12222
12333
12344
12345
Here you go:
On what basis does .compareTo work
compareTo() function compares two String objects alphabetically.
It subtracts the ASCII value of the first different character present in the two String objects.
Example: “ACT”.compareTo(“CAT”) will give -2 as ASCII value of ‘A’ – ASCII value of ‘C’ = 65 – 68 = -2
Similarly: “CAT”.compareTo(“ACT”) will give 2.
So, we can say that if A.compareTo(B) gives a value > 0, then the String A and B are not arranged in alphabetical order and needs to be swapped.
an object can be defined as an instance of a class. For greater efficiency the class is broken down into a number of objects, which become a class’s integral parts. A class creates objects which have similar attributes. The objects are created from the information only available in that class, hence it is liable to be called as an instance of a class.
How to do the following pattern
12345
2345
345
45
5
Here you go:
Input any number and check if it is a Palindrome Number or not. A number that reads the same from both the ends (Hint: 121 = 121)
what does int in bracket mean
(int)
It means we are converting the numerical result forcefully into an integer data type.
Example: (int)3.5 will give me 3
input two numbers greater than zero and print which one of them is nearest to 21 without getting over the number 21
Hello Sandip,
WAP to display the following pattern ?
* * * * * * * * * *
* * * * * * * * *
* * * * * * * *
* * * * * * *
* * * * * *
* * * * *
* * * *
* * *
* *
*
Indeed You are Doing A Great Job !! (y)
sir how do we find the twin prime numbers till the number entered by the user
http://www.guideforschool.com/1933937-java-program-to-print-twin-prime-numbers-within-a-range/
how to make a pattern by accepting a word
Example:
input the distance in metres and convert it into miles
Hello Sandip,
1 meter = (1/1609.34) miles
So, the code can be written as:
Write a program to check a no whether it is a pallindroem or not … USING WHILE LOOP
Here is the program:
wap to check whether a number is an ISBN number or not?
See: http://www.guideforschool.com/359-isc-2013-question-1-practical-paper-solved/
Sir, is there any way to find the no. of digits in a double value no.
for eg : Input=42.009
output=: No.of digits=5
how to write a program to accept 2 numbers and check whether they are twin primes or not??
Shaunak here is the program:
java program for
(1+2)+(1+2+3)+(1+2+3+4)………………….for n terms
Hello Abhishek,
Below is the logic which you need to implement after having taken ‘n’ as input from the user:
We hope this helps.
int r=(int)t%10;
s=s+(d*r);
d–;
t=t/10;
explain the working of this statement. if we have to find the sum of the digits or anything such that this kind of logic is often found in the program. how do they work?
The logic used for any operations involving digits is:
For finding sum of every digit the code will be:
Suppose the number (n) is 945.
Step 1:
so, 645 > 0 is true
therefore, d = 645 % 10 = 5
so sum = 0 + 5 = 5
and n = 645/10 = 64
Step 2:
so, 64 > 0 is true
therefore, d = 64 % 10 = 4
so sum = 5 + 4 = 9
and n = 64/10 = 6
Step 3:
so, 6 > 0 is true
therefore, d = 6 % 10 = 6
so sum = 9 + 6 = 15
and n = 6/10 = 0
Step 4:
so, 0 > 0 is false
so the loop will end and we have the sum stored in the variable sum
Which are the most-likely programs for 2014 boards?
any guess?
if so, please tell
thank you!
Go through this: http://www.guideforschool.com/1891649-advice-regarding-icse-computer-applications-examination/
Write a program for foll pattern
1 2 3 4 5
6 7 8 9
10 11 12
13 14
15
Here is the program:
Write a program on following pattern :-
15 14 13 12 11
10 9 8 7
6 5 4
3 2
1
Here is the program:
Write a program to accept a number and display the frequency of each digit present in the number
SAMPLE INPUT – 341124
SAMPLE OUTPUT – The frequency of 1 = 2
The frequency of 4 = 2
Here is the program: http://www.guideforschool.com/526495-program-to-find-frequency-of-every-digit-in-a-number/
how we can make a program in which we have to accept a sentence from a user and print those words which starts with a vowel…
thankss…
can we convert a string to an array by to char array()and perform operations like append?as we perform on buffer reader.
Yes, you can use the “toCharArray()” function of the String class which converts a String into a character array.
So, if the string is, String s=”JAVA FOR SCHOOL”, then the statement,
char ch [] = s.toCharArray(); will make a character array like
ch[]={‘J’, ‘A’, ‘V’, ‘A’, ‘ ‘, ‘F’, ‘O’, ‘R’, ‘ ‘, ‘S’, ‘C’, ‘H’, ‘O’, ‘O’, ‘L’};
Is String Buffer there in portion?
Are functions like .append() and .charToArray() there in the ICSE syllabus?
Difference between a String and StringBuffer object may come. But the detailed concept of StringBuffer class and its functions are not there in the ICSE syllabus.
Is it necessary to use BufferedReader in the programs? Can we use scanner class instead?
No it is not necessary to always use BufferedReader class. You can also use Scanner class for taking inputs.
can complex patterns such as parallelogram and rhombus using for loop come?
example *
* * *
* * * * *
* * *
*
No kaushik, rhombus and parallelogram won’t come in ICSE.
The example you gave might come. It is quite easy.
how to write a program to print the longest word in a sentence
See: http://www.guideforschool.com/335-program-to-find-the-shortest-and-longest-word-in-a-sentence-method-1/
which sorting is in icse course.and how to understand string programs..
Hello Ayush,
You have Selection sorting and Bubble Sorting of one dimensional array in the ICSE course.
Below is an exerpt from the ICSE Scope of Syllabus:
Arrays
Regarding String programs,
You have to think a String to be just like an array of characters. Like you use every element in the array by writing its index, similarly, in order to access the characters of a String, you need to extract the characters through their index using charAt() function.
Think of it this way, and if your concept of array is strong, then the working of Strings will be really easy for you.
what are arrays
how do they work
An array is a container object that holds a fixed number of values of a single data-type. The length of an array is established when the array is created. After creation, its length is fixed.
So, if you have to store names of 50 students, then you would require 50 different variables. It is quite inconvenient to remember the names of so many variables. Instead of doing this, we can create an array having 50 elements for storing 50 names. You only have to remain the name of only a single array.

An array of 10 elements.
Illustration of an array as 10 boxes numbered 0 through 9; an index of 0 indicates the first element in the array.
Each item in an array is called an element, and each element is accessed by its numerical index. As shown in the preceding illustration, numbering begins with 0. The 9th element, for example, would therefore be accessed at index 8.
So if the name of the array is arr[], then to access the 9th element, we have to write arr[8].
Each item in an array is called an element, and each element is accessed by its numerical index. As shown in the preceding illustration, numbering begins with 0. The 9th element, for example, would therefore be accessed at index 8.
A program code is divided into various entities which are known as objects of a class.objects have the data and functions which are also known as characterstics and behaviour .object is a set of related data which can share the information and can interact with each other.
how do you define an object?
An object is a software bundle of variables and related methods.