aspose file tools*
The moose likes Java in General and the fly likes VB & Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "VB & Java "Option"  Question." Watch "VB & Java "Option"  Question." New topic
Author

VB & Java "Option" Question.

Anand Karia
Ranch Hand

Joined: Sep 25, 2004
Posts: 156

Hi All

I have a function having

public void getTel(String str, String Narration1, String Destination)

Like in Visual Basic we normally use Optional command between parameters like

public void getTel(String str, String Narration1, Optional String Destination)

Due to which we are capable to use the same function regardless of declaring Destination parameter.

Is there any type or anything available in java who can do the same for me.

ANAND KARIA


Love is GOD and GOD is Love.
Anand Karia
IT Concretor.......
M/s. Anand Karia Concreting IT
Tony Morris
Ranch Hand

Joined: Sep 24, 2003
Posts: 1608
Yes, method overloading.

http://java.sun.com/docs/books/tutorial/java/javaOO/methoddecl.html


Tony Morris
Java Q&A (FAQ, Trivia)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: VB & Java "Option" Question.
 
Similar Threads
formal parameter on functions in java
Strings
whether Object is a keyword?
JNI
Can we convert "Array of Strings" to a "String"??