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. I need code for read write mifare 1k card using No
View Tutorial          By: amarendra at 2010-12-02 21:12:08

2. Hi Rahul,How to run this program kindly send me th
View Tutorial          By: Das at 2008-09-04 00:53:02

3. Thanks for providing this page it works with local
View Tutorial          By: Dharam Jaswal at 2012-02-02 13:19:24

4. So inf0rmative!
View Tutorial          By: Pamela at 2008-11-08 07:29:24

5. hello,
how can i add a specific variable va

View Tutorial          By: Abdulla at 2014-12-05 15:30:27

6. very good example.....................
View Tutorial          By: sreeLakshmi at 2012-06-15 08:21:12

7. well...raghu download the sun api...whose link is
View Tutorial          By: rima at 2008-12-27 22:22:03

8. very Good machi.......
View Tutorial          By: Janani at 2013-03-04 06:37:47

9. If i jus wanna read the files in the phone , how s
View Tutorial          By: vt at 2010-01-28 02:50:26

10. When I use this code it puts everything I append o
View Tutorial          By: Amber at 2012-06-18 15:33:22