package pretechtest;public class StringTest {public static void main(String[] args) {String str = "Hello pretech";for (int i = 0; i <= str.length()-1; i++) {System.out.println(str.charAt(i));}}}
Output
H
e
l
l
o
p
r
e
t
e
c
h
1️⃣ Check if a String is a Palindrome Problem Given a string, check if it reads the same forward and backward. Example: "madam...
No comments:
Post a Comment