Palindrome program in Java with Examples & Programs

Palindrome: Palindrome is a Word, number (or) sequence of characters are the same after the reverse of the word (or) number. Example of Palindrome: Number Palindrome Examples: 6556, 343, 1441, 24542,757. String Palindrome Examples: level, madam, refer, rotor, lol. Example of number Palindrome: class Palindrome1 {   public...
Share:

Prime Number Program in Java Using While loop & For Loop

Prime Number: A number that is divisible only by itself and 1 is called Prime number. Examples: 2, 3, 5, 7, 11, 13, 17, 19 etc. Prime number programs in Java: Program to display the prime numbers from 1 to 100 public class Prime {  public static void main(String[] args)  {   int limit = 100;   System.out.println("Prime...
Share:

Switch Statement in Java | Java Switch With Examples

Switch statement in Java: If several options are available then it isn’t recommended to take nested if-else we should go for switch statement so that readability of the code will be improved. “Switch” is a keyword, by using which we can create a selection statement with multiple choices. Multiple choices can be constructed by using a “Case” keyword. Syntax: ...
Share:

Ads

Search This Blog

  • ()
Powered by Blogger.

Strings in C With Syntax, C String Program with output

Strings in C :  Strings can be defined as the one-dimensional array of characters terminated by a null ('\0'). The difference betwee...