Results 1 to 4 of 4
Thread: int count=ss.lenght(); error
- 12-04-2009, 05:15 AM #1
int count=ss.lenght(); error
class Count{
public static void main(String ar[])
{
String ss=ar[0];
int count=ss.lenght();
System.out.println("count"+ss.length()+count);
//System.out.println("count"+ss.length());}}
if this is the pgm then
error
Count.java:8: cannot find symbol
symbol : method lenght()
location: class java.lang.String
int count=ss.lenght();
^
1 error
if i commnet the "int count=ss.lenght();" and next line and uncomment then it will give out put no error why this?????????
- 12-04-2009, 05:57 AM #2
It's a typo.
Java Code:int count=ss.leng[COLOR="Red"]ht[/COLOR]();
should be
Java Code:int count=ss.leng[COLOR="#ff0000"]th[/COLOR]();
CodesAway - codesaway.info
writing tools that make writing code a little easier
- 12-04-2009, 05:58 AM #3
Senior Member
- Join Date
- Sep 2009
- Location
- Sweden/Borås
- Posts
- 107
- Rep Power
- 0
Morning.
What are your
Meant to do ?Java Code:String ss=ar[0]; int count=ss.lenght(); System.out.println("count"+ss.length()+count);
- 12-04-2009, 09:37 AM #4
Similar Threads
-
Line Count
By tim in forum NetBeansReplies: 1Last Post: 08-02-2009, 04:41 PM -
Making a count..
By Samgetsmoney in forum New To JavaReplies: 15Last Post: 02-18-2009, 01:44 PM -
Select Count
By Apple2 in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 04-29-2008, 09:02 AM -
Getting row count
By Java Tip in forum Java TipReplies: 0Last Post: 02-11-2008, 08:49 AM -
how to count 2 inserts together?
By kim85 in forum New To JavaReplies: 0Last Post: 01-20-2008, 11:25 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks