Register and join over 40,000 other developers!
Recent Topics
-
Print specific values from dictionary with a specific key name
Siten0308 - Jun 20 2019 01:43 PM
-
Learn algorithms and programming concepts
johnnylo - Apr 23 2019 07:49 AM
-
Job Gig PHP Form Needed
PJohnson - Apr 18 2019 03:55 AM
-
How to make code run differently depending on the platform it is running on?
xarzu - Apr 05 2019 09:17 AM
-
How do I set a breakpoint in an attached process in visual studio
xarzu - Apr 04 2019 11:47 AM
Recent Blog Entries
Recent Status Updates
Popular Tags
- networking
- Managed C++
- stream
- console
- database
- authentication
- Visual Basic 4 / 5 / 6
- session
- Connection
- asp.net
- import
- syntax
- hardware
- html5
- array
- mysql
- java
- php
- c++
- string
- C#
- html
- loop
- timer
- jquery
- ajax
- javascript
- programming
- android
- css
- assembly
- c
- form
- vb.net
- xml
- linked list
- login
- encryption
- pseudocode
- calculator
- sql
- python
- setup
- help
- game
- combobox
- binary
- hello world
- grid
- innerHTML

5 replies to this topic
#1
Posted 19 March 2011 - 08:03 AM
Can char variable type be used in a Java method? Can the method using char be overloaded? If so can I get an example!! It doesn't need to be code I am just trying to figure out if you can use char in methods??
#2
Posted 19 March 2011 - 08:43 AM
Yes,
You can overload any type, return any type and receive any type.
public char somecharfunc(char a, char b) { return a; } public char somecharfunc(char a) { return a; }
You can overload any type, return any type and receive any type.
#3
Posted 19 March 2011 - 09:33 AM
Ok..thanks..so it is easy to assume you cannot mix the variable types for obvious reasons, exmple........
This would be incorrect, right?
public int intOne(double val1, char b)
This would be incorrect, right?
#4
Posted 19 March 2011 - 11:08 AM
No, this is correct, you just need to make sure it returns a int.
#5
Posted 19 March 2011 - 11:36 AM
Thats the problem it doesnt diplay anything when the code is ran...anything obvious??
#6
Posted 19 March 2011 - 11:40 AM
Nevermind wrong thread...sorry
Edited by yourmom615, 20 March 2011 - 12:17 PM.
Also tagged with one or more of these keywords: variable type
Tutorial Forums →
PHP Tutorials →
PHP OOP Tutorial from beginner to advance - (Scope and Calculator - Part 3)Started by papabear, 28 Sep 2012 ![]() |
|
![]() |
||
Language Forums →
C and C++ →
Difference between types and referencesStarted by DreamFM, 22 Jul 2012 ![]() |
|
![]() |
||
Language Forums →
Java →
How to save MySQL query result?Started by alex1, 05 Mar 2012 ![]() |
|
![]() |
||
Language Forums →
PHP →
Prepared statement problemStarted by Rohan21, 02 Jan 2012 ![]() |
|
![]() |
||
Language Forums →
C and C++ →
Help with IPv4 pleaseStarted by toto_7, 17 Nov 2011 ![]() |
|
![]() |
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download