Java

289
4203 reads

February 12, 2013

Palindrome String


In this example, we enter a word and check whether it is palindrome or not.
We check by reversing the given word and storing it in another variable and then
comparing both string.

39
2453 reads

February 12, 2013

Number of Vowels in a word.


In this example we find number of vowels present in a word or a sentence.
We declare a string vowel, in which all vowels are stored.

33
477 reads

February 12, 2013

Search for 2D Number


The program below has a break statement which affects the innermost loop in which it is located.

55
2330 reads

February 12, 2013

Month from Number Using SwitchCase


The program below takes input from the user and displays the month according to the inputted number by the user.

27
2250 reads

February 12, 2013

String Concatenation


This example shows you that how to concatenate strings.

53
2429 reads

February 12, 2013

LetterGrade


The program below demonstrates the flow control of the given score of 92

36
2297 reads

February 12, 2013

Complex Arithmetic


More complicated arithmetic expressions can be written quite easily. The program below shows one example of combining the various operators in a more interesting calculation.

68
2372 reads

February 12, 2013

Prime Number Test


Prime number is a number which is divisible by one or by itself only.
In this example we check for any factors of number that are present between number and one.

27
2246 reads

February 12, 2013

Arithmethic ASCII Table


The program below prints the ASCII table.

38
2285 reads

February 12, 2013

The arithmetic sequence program


This example demonstrates a series where the difference of each term relative to the previous term is the same (i.e. discrete linear function), this program uses long as data type, in a SERIES.