Comment on Tutorial - indexOf( ) and lastIndexOf( ) in Java By Hong



Comment Added by : arya

Comment Added at : 2012-11-07 08:37:59

Comment on Tutorial : indexOf( ) and lastIndexOf( ) in Java By Hong
import java.io.*;
class lastindexof
{
public static void main(String argv[]) throws IOException
{
String mystr;
BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
System.out.print("enter the string");
mystr=bf.readLine();
System.out.println(" character at position is=" +mystr.lastIndexOf());
}
}

why this program always showing me cannot find symbol error


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. when i tried this code i couldnt run the program..
View Tutorial          By: kavitha at 2009-11-28 01:38:55

2. I discover unlimited calendar.this calendar use of
View Tutorial          By: Lalit Kumbhani at 2011-12-31 16:02:06

3. Hi all
I connected my mobile wi

View Tutorial          By: sruthy at 2010-07-07 03:44:27

4. Hi
after i dl the javacomm20-win32.zip and

View Tutorial          By: jm at 2010-05-31 01:42:28

5. Controlling Page Navigation in JSF - Static and Dy
View Tutorial          By: chip at 2010-10-07 05:16:14

6. It was really helpful.... i cleared my lab test wi
View Tutorial          By: kishore at 2009-01-21 22:30:08

7. good job
View Tutorial          By: gopi at 2008-07-01 02:02:48

8. Thanks for this tutorial . This provides me lots
View Tutorial          By: Pranit at 2011-07-25 09:12:29

9. What is the difference between an Interface and an
View Tutorial          By: RAJA at 2015-06-26 17:28:31

10. Answer for comment 5
this loop is work infi

View Tutorial          By: salman at 2013-03-10 07:30:53