This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman 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 Building Microservices this week in the Design 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: 76
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: 8661
    
  23

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?
Articles by Winston can be found here
sparsh khandelwal
Ranch Hand

Joined: Dec 20, 2010
Posts: 76
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: 20057
    
  44

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)
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: problem with findinline function
 
It's not a secret anymore!