Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
fst
//'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_111 import java.util.*; import java.lang.*; class Rextester { public static void main(String ar[]) { //String str="word"; //for(int i=0; i < strArray.length; i++){ //System.out.println(strArray[i]); System.out.println("Palin status of the word is :-"+ Rextester.palin("DeleleleD")); } public static boolean palin(String word){ //String arr[]=new String[]{"word"}; String words=word; char[] arr=words.toCharArray(); int j=arr.length-1; System.out.println("value of j " +j); boolean flag=true; for(int i=0;i<arr.length;i++) { if(arr[i]==arr[j]) { System.out.println("true"); } else { System.out.println("false"); flag=false; } j--; } if(flag==false) return false; else { return true; } } }
run
|
edit
|
history
|
help
0
pass
JavaQ5
rta
javaClassAr2
3.A
2
ekse
Java # Faktöriyel
JAVA # Karekök Hesaplama
Cola Machine