Creates line<span> shapes and paths.</span>
Answer:
import java.util.Scanner;
public class Pallindrome {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter the input string: ");
String word = in.nextLine();
System.out.println(isPallindrome(word));
}
public static String isPallindrome(String word){
String rev ="";
int len = word.length();
for ( int i = len - 1; i >= 0; i-- )
rev = rev + word.charAt(i);
if (word.equals(rev))
return word+" is palindrome";
else
return word+ " is not palindrome";
}
}
Explanation:
- Create the method in Java to receive a String parameter
- Using a for loop reverse the string
- Use another for loop to compare the characters of the original string and the reversed string
- If they are equal print palindrome
- else print not palindrome
- Within the main method prompt user for a sentence
- Call the method and pass the sentence entered by user
The best
windows software tool to use when someone wants to establish baselines is performance
monitor. Windows Performance Monitor makes use of the following which can be combined into
sets of data collector:
1. Performance counters
2. Event trace data
<span>3. Configuration information</span>