Results 1 to 6 of 6
Thread: How to make a function?
- 02-21-2009, 05:14 AM #1
Member
- Join Date
- Feb 2009
- Posts
- 3
- Rep Power
- 0
- 02-21-2009, 05:23 AM #2
java don't have functions.
its called a method. Defining Methods (The Java™ Tutorials > Learning the Java Language > Classes and Objects)USE CODE TAGS--> [CODE]...[/CODE]
Get NotePad++ (free)
- 02-21-2009, 06:32 AM #3
Senior Member
- Join Date
- Jan 2009
- Posts
- 671
- Rep Power
- 5
That's probably about 100 lines of code. Give us a good reason to do your job for you.
- 02-21-2009, 07:01 AM #4
there is not any inbuilt function for that.... you have to make your own code in that you have to check total number of digit and according to that u have to check so much condition ...
its very lenghthy
;)
but its not difficult......Rakesh Mehta
- 02-23-2009, 07:19 AM #5
Member
- Join Date
- Feb 2009
- Posts
- 2
- Rep Power
- 0
Hello. How can I make getParameters(); function?
- 02-23-2009, 09:51 AM #6
Member
- Join Date
- Feb 2009
- Posts
- 2
- Rep Power
- 0
add function
public class URL {
public static void main(String[] args) {
String letters = "something.com/prodhhhucta.aspx?product=1148117" +
"&category=69977611&page=2&x=30&catalog=19";
int i = letters.indexOf("?");
String output = letters.substring(i+1);
String delims = "&";
StringTokenizer st = new StringTokenizer(output, delims);
Vector v = new Vector();
while(st.hasMoreTokens())
{
String token = st.nextToken();
v.addElement(token);
}
Enumeration param = v.elements();
while(param.hasMoreElements())
{
System.out.println(param.nextElement());
}
}
}
*****************************************
This is my program. I want to add getParameters() function. But I don't know how can I do. Please help me. Thanks beforehand
Similar Threads
-
How to make print function for single label?
By makpandian in forum AWT / SwingReplies: 2Last Post: 02-12-2009, 05:26 PM -
Need help with get function
By calicocal in forum New To JavaReplies: 10Last Post: 11-09-2008, 07:59 PM -
make search function ike eclipse search in window->preference
By i4ba1 in forum Advanced JavaReplies: 5Last Post: 08-26-2008, 03:43 PM -
Need a little help with a function!
By Nuluvius in forum New To JavaReplies: 3Last Post: 02-07-2008, 11:33 PM -
I want to add function
By romina in forum New To JavaReplies: 1Last Post: 08-07-2007, 05:25 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks