Example
package com.pretech;public class EnumToStringExample {public static void main(String[] args) {String days = Days.MONDAY.name();System.out.println(days + " " + days.getClass());}}enum Days {MONDAY}
Output
MONDAY class java.lang.String
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