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



Ask a Question

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. Thanks for the explanation. I had read about this
View Tutorial          By: Sidharth Sahoo at 2012-09-12 16:26:07

2. Hi IDK,
You close any applications includin

View Tutorial          By: Steven at 2008-12-30 03:14:33

3. Thanks a lot for the code...
thats working

View Tutorial          By: Rahul at 2008-06-28 14:16:10

4. This works with inserts but it is very slow for lo
View Tutorial          By: Antonio Pereira at 2011-02-04 08:54:45

5. I want get data from Mysql into Spinner by using P
View Tutorial          By: Dilsha at 2013-07-06 05:17:58

6. thanks for this example but i want the whether th
View Tutorial          By: Rupesh Chavan at 2010-03-14 07:36:31

7. help
View Tutorial          By: sne at 2012-08-10 07:13:28

8. I have a squid proxy installed as forward proxy an
View Tutorial          By: ruffy at 2012-12-20 12:34:15

9. great example for beginners. Thank you
View Tutorial          By: kumar at 2011-11-24 08:15:14

10. its good and well performance
View Tutorial          By: siva.c at 2014-09-02 08:18:19