Package java.lang

Examples of java.lang.String.lastIndexOf()


  {
        // Get the current time and convert to a String
        long millis = System.currentTimeMillis();
        Timestamp ts = new Timestamp(millis);
        String s = ts.toString();
        s = s.substring(0, s.lastIndexOf("."));
        return s;
  }

  // no instances permitted.
  private CurrentTime() {}
View Full Code Here


  {
        // Get the current time and convert to a String
        long millis = System.currentTimeMillis();
        Timestamp ts = new Timestamp(millis);
        String s = ts.toString();
        s = s.substring(0, s.lastIndexOf("."));
        return s;
  }

  // no instances permitted.
  private CurrentTime() {}
View Full Code Here

    }

    public String getBasename(String fullname)
    {
        String filename = (new File(fullname)).getName();
        int index = filename.lastIndexOf('.');
        if (index == -1)
        {
            return filename;
        }
        else
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.