This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes problem with findinline function Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "problem with findinline function" Watch "problem with findinline function" New topic
Author

problem with findinline function

sparsh khandelwal
Ranch Hand

Joined: Dec 20, 2010
Posts: 70
try to write code to understand the function of findInLine function , but i failed to write a successful program.

what i try to do that if i give input "abcd" , then variable a will be = to d ,varibale b=c ,c=b and d=a (according to the input , but face a run time error)
please help
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7029
    
  16

sparsh khandelwal wrote:what i try to do that if i give input "abcd" , then variable a will be = to d ,varibale b=c ,c=b and d=a (according to the input , but face a run time error)

First: when asking a question about an error, you should always specify what the error is, including providing the exact message. I have to admit to never having used findInLine(), but from what I see, I'd care to bet that yours is an IndexOutOfBoundsException.

Second: Your statement above is definitely NOT what I get from reading the API docs for findInLine(). Maybe you could explain why you think it works that way.

Winston


Isn't it funny how there's always time and money enough to do it WRONG?
Artlicles by Winston can be found here
sparsh khandelwal
Ranch Hand

Joined: Dec 20, 2010
Posts: 70
hey thank for your time
here comes the actual program , i modify this one to understand the working of findinline function but failed to do so :-)
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18101
    
  39

sparsh khandelwal wrote:hey thank for your time
here comes the actual program , i modify this one to understand the working of findinline function but failed to do so :-)


Hate to point out the obvious, but can you guess what the error may be based on the exception that is returned???

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
 
subject: problem with findinline function
 
Similar Threads
Searching using Scanner class exp. in K&B SCJP6
Scanner class
K & B example Problem.
Scanner question or maybe it may be more about java class API's
using Scanner class in search