File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

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.


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.

Tony Morris
Java Q&A (FAQ, Trivia)
I agree. Here's the link:
subject: VB & Java "Option" Question.
It's not a secret anymore!