Posts

Showing posts from October, 2021

Java String methods practice programme .

 public class nilesh{     public static void main(String args[]){         String name ="Harry";         String n ="Nilesh";      // YOU CAN UNCOMMENT ONE BY ONE AND CHECK THE RESULT AND LEARN             //   System.out.println(name.length());        // System.out.println(name.toLowerCase());        // System.out.println(name.toUpperCase());         //String nontrimmedstring ="            harry        ";         //System.out.println(nontrimmedstring.trim());         //System.out.println(name.substring(1,4));         //System.out.println(n.replace('N','P'));         //System.out.println(name.startsWith("Ha"));         //System.out.println(name.endsWith("rry"));   ...