To check whether string is palindrome or not

How to create a function which initialize a 1-d array ar[] of 15 integers and print the sum of all the integers which are present at odd indexces.

import java.util.*; public class SumOfOddIndexces { public static void print1() { Scanner Sc=new Scanner(System.in); System.out.println("Enter 15 Integer"); int a […

2 years ago

Write a java program to take string as an input and check whether it is Palindrome or not.

class PQR{ public static void main(String k) { int l=k.length(); String m=""; //empty for(int i=l-1;i>=0;i--) { m=m+(k.charAt(i)); } if(m.compareTo(k)==0) {…

2 years ago