programes on strings
a. write a program to copy one array to another array using System.arrayCopy() method.
b. write a program to check whether entered string is palindrome or not.
View Answers
March 26, 2011 at 11:27 AM
March 26, 2011 at 11:27 AM
import java.util.*;
public class CheckPalindrome{
public static void main(String[]args){
Scanner input=new Scanner(System.in);
System.out.print("Enter String: ");
String st=input.next();
String str[]=st.split("");
String reversedSt="";
for(int i=str.length-1;i>=0;i--){
reversedSt+=str[i];
}
if(st.equalsIgnoreCase(reversedSt)){
System.out.println("String is palindrome");
}
else{
System.out.println("String is not palindrome");
}
}
}
Ads
Related Tutorials/Questions & Answers:
programes on strings
programes on
strings a. write a program to copy one array to another array using System.arrayCopy() method.
b. write a program to check whether entered string is palindrome or not.
Have a look at the following link
programes on methods
programes on methods
write a program to implement bubble sort
write a program to demonstrate call by value and call by reference.(pass objects... function
write a program to concatenate two
strings entered by user
design a class
Advertisements
strings
strings difference between the
strings in java and c
strings
strings write a program in java to accept two
strings as command line arguments and perform the following operations-:
1) compare the
strings
2... is an example which accept two
strings as command line arguments and perform
strings
strings read sentence and convert all the word into capital case like camelcase
Hi Friend,
Try the following code:
import java.util.*;
class ConvertWordsIntoUpperCase
{
public static String toCamelCase(String
Strings
will contain
strings which is separated by ",".
From the main method invoke
programes on for loop
programes on for loop a. write a program to find squares and cubes of 1st 10 integers
b. write a program to to calculate factorial of a no,
c. write a program to print Fibonacci series
d. write a program to check whether entered
programes on for loop
programes on for loop a. write a program to find squares and cubes of 1st 10 integers
b. write a program to to calculate factorial of a no,
c. write a program to print Fibonacci series
d. write a program to check whether entered
programes on for loop
programes on for loop a. write a program to find squares and cubes of 1st 10 integers
b. write a program to to calculate factorial of a no,
c. write a program to print Fibonacci series
d. write a program to check whether entered
programes on for loop
programes on for loop a. write a program to find squares and cubes of 1st 10 integers
b. write a program to to calculate factorial of a no,
c. write a program to print Fibonacci series
d. write a program to check whether entered
programes on switch
programes on switch
write a program to design menu driven arithmetic calculator
write a program to print no of days in a given month
import java.util.*;
class Calculator
{
public static void main(String[] args
programes on if....else
programes on if....else
write a program to check whether entered year is leap year or not
write a program to check whether entered no. ends with 5 or not
write a program to find minimum of 3 nos using nested if else.
write
programes on array
programes on array a. write a program to find max and min element in an array of an integer
b. write a program to convert decimal no. to binary and back to decimal.
c. write a program to do following:-
i) addition of two
programes on while loop
programes on while loop
write a program to calculate sum of an entered digit
write a program to find gcd and lcm of 2 positive integers
Java sum of digits
Java Find LCM and GCD
programes on do... while
programes on do... while
write a program to print reverse of a given digit
write a program to check whether entered digit is palindrome or not
write a program to check whether entered no. is Armstrong or not
1
Strings in PHP
Strings in PHP Hi, I am beginners and want to know about
strings in PHP and different ways to print a string. Can someone help me in this regards?
Following tutorials will help you in details about
strings in PHP
strings concatnation
strings concatnation in string1 "123456 ABC DEF...",IN string2 "raveen". iwant to add string2 after 123456 in the first string based on index number.i need logic
strings in java
strings in java please explain me the flow of this program..not able to execute correctly n wats the use of clone
public class Strclone {
public static void main(String args[])
{ String s=new String("a");
String s1
strings 20june
strings 20june please explain me the flow of this program..not able to execute correctly n wats the use of clone
public class Strclone {
public static void main(String args[]) { String s=new String("a"); String s1 = "Hello
compare two strings in java
compare two
strings in java How to compare two
strings in java...)
{
System.out.println("The two
strings are the same.");
}
}
}
Output:
The two
strings are the same.
Description:-Here is an example of comparing two
ModuleNotFoundError: No module named 'strings'
ModuleNotFoundError: No module named '
strings' Hi,
My Python... '
strings'
How to remove the ModuleNotFoundError: No module named '
strings... to install padas library.
You can install
strings python with following command