How to write a java recursive function to split string to small chunks?
-
I want to write a java recursive function to split string into small chunks and store them in a newly created object which has a data member that can hold a string. splitting algorithm is done. the class that holds the splited chunks are also created. I want to know how to write the object creation part. how to declare the object so that if the function was repeated for 5 times, 5 objects will be created? Thanks.
-
Answer:
Well, you have created the class for the object. Let's say that class is named Splitstring. In that class, you should've created the constructor which has syntax: public Splitstring(*parameters*) { } The constructor constructs a new object of the class. To create an object of that class, you would call the constructor which syntax looks like this: Splitstring avariablename = new Splitstrong(*parameters*); hope that helps
Maduranga C at Yahoo! Answers Visit the source
Related Q & A:
- how to Create a Java Package from MATLAB Code?Best solution by Stack Overflow
- how to write to java file in the best way?Best solution by Stack Overflow
- How to do a MySQL recursive query?Best solution by Stack Overflow
- How to load a Java web app in the terminal?Best solution by stackoverflow.com
- How to create a java applet?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.