2:16 am - Saturday December 15, 2018

String Example Program for lastIndexOf(String str)

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044
/**
@AUTHOR: candid java
@DESCRIPTION: coding to find the index of specified string.
*/
public class LastIndexOfStr
{
 public static void main(String args[])
  {
   String s ="Web Technology";
   System.out.println(s);
   System.out.println("lastIndexOf(Technology)" + s.lastIndexOf("Technology"));//display the specied //string?s index
  }
}

OUTPUT:
Web Technology
lastIndexOf(Technology)4

BACK

Filed in: Z-A All Java Codes

Comments are closed.