A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Java
»
Java in General
Author
VB & Java "Option" Question.
Anand Karia
Ranch Hand
Joined: Sep 25, 2004
Posts: 154
posted
Oct 30, 2004 03:17:00
0
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.<br /> <br />Anand Karia<br />Manager I.T<br />Artistic Garment Ind. Pvt. Ltd<br />MSC (Computer Science)
Tony Morris
Ranch Hand
Joined: Sep 24, 2003
Posts: 1608
posted
Oct 30, 2004 03:52:00
0
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://ej-technologies/jprofiler
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: VB & Java "Option" Question.
Similar Threads
JNI
whether Object is a keyword?
Can we convert "Array of Strings" to a "String"??
Strings
formal parameter on functions in java
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter