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



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. package alphabets;

import java.util

View Tutorial          By: Nitish at 2013-01-25 04:06:38

2. Hi,
I'm having a problem with the above cod

View Tutorial          By: sushanth at 2015-05-04 07:32:17

3. using a same name ,return type and parameter type
View Tutorial          By: sam at 2011-06-24 15:13:34

4. i run this program. its not showing any runtime or
View Tutorial          By: anand sp at 2011-03-07 10:11:37

5. Hi divya, You will have to edit the SerialParamete
View Tutorial          By: Ramlak at 2008-04-27 05:54:47

6. super
View Tutorial          By: asasdfsa at 2014-05-29 05:23:04

7. hi.I am new in j2me and really want to learn more
View Tutorial          By: Vicky Mittal at 2012-01-05 11:45:53

8. This solution worked like a charm, thank you. I ha
View Tutorial          By: budfox at 2014-07-15 14:25:16

9. Very informative and simple to understand. Thank y
View Tutorial          By: Rosa Vladivord at 2012-12-23 13:00:52

10. this is simple and informative.thanks
View Tutorial          By: amrita at 2011-11-12 14:32:58