Results 1 to 9 of 9
Thread: Quick easy question
- 01-04-2010, 06:18 AM #1
Senior Member
- Join Date
- Nov 2008
- Posts
- 105
- Rep Power
- 0
- 01-04-2010, 06:37 AM #2
Senior Member
- Join Date
- Oct 2009
- Location
- California,US
- Posts
- 201
- Rep Power
- 4
first of all.
this is a wrng representation
String "cool" = hello
it shld be
String cool = "hello"; instead.
2nd of all characters are primitive types that have only 1 value either a letter or a number.
So your question doesnt make sense. "how would you check if a String has a character at a certain poisition?"
So can you please elaborate?
- 01-04-2010, 06:46 AM #3
Senior Member
- Join Date
- Nov 2008
- Posts
- 105
- Rep Power
- 0
I realize the thing about the String, I am just writing shorthand.
I am saying, the string "cool".
How can I check if at the position(4) if there is a char there or not.
- 01-04-2010, 06:59 AM #4
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
A String has characters for it's entire length. Are you trying to check for certain types of characters instead? e.g Non visible characters?
- 01-04-2010, 07:26 AM #5
Senior Member
- Join Date
- Nov 2008
- Posts
- 105
- Rep Power
- 0
Forget the question, I was just having 2 types of strings inputed, one is one character shorter than the other. I was just trying to check if there was a character there on the shorter string. Doesn't matter though, I will just use .length()
- 01-04-2010, 08:00 AM #6
Senior Member
- Join Date
- Oct 2009
- Location
- California,US
- Posts
- 201
- Rep Power
- 4
oh..at that case you can use the strng length which would be a common way.
you can also charat(..)
just try combo of while loop and charat(..)
- 01-04-2010, 12:55 PM #7
Member
- Join Date
- Dec 2009
- Posts
- 68
- Rep Power
- 0
sir excuse me what does it mean by non visible charactersA String has characters for it's entire length. Are you trying to check for certain types of characters instead? e.g Non visible characters?
- 01-04-2010, 12:58 PM #8
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
Silly characters like space, carriage return, e.t.c
- 01-04-2010, 03:34 PM #9
Member
- Join Date
- Dec 2009
- Posts
- 68
- Rep Power
- 0
Similar Threads
-
Quick and Easy Job.
By Scottyb in forum Jobs OfferedReplies: 3Last Post: 08-11-2009, 03:48 PM -
Quick and easy question about SQL databases.
By mainy in forum New To JavaReplies: 3Last Post: 08-05-2009, 02:04 PM -
New to Java and have an easy question
By JBOY08 in forum New To JavaReplies: 1Last Post: 11-19-2008, 07:40 PM -
quick easy question
By jmHoekst in forum New To JavaReplies: 1Last Post: 06-19-2008, 03:28 PM -
Easy question
By JavaNoob in forum New To JavaReplies: 10Last Post: 08-03-2007, 10:28 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks