Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search Coderanch
Advance search
Google search
Register / Login
Vladimir Yatsevskiy
Greenhorn
+ Follow
3
Posts
1
Threads
0
Cows
since Sep 05, 2012
Merit badge:
grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
Ranch Hand Scavenger Hunt
Number Posts (3/100)
Number Threads Started (1/100)
Number Cows Received (0/5)
Number Likes Received (0/10)
Number Likes Granted (0/20)
Set bumper stickers in profile (0/3)
Report a post to the moderators (0/1)
Edit a wiki page (0/1)
Create a post with an image (0/2)
Greenhorn Scavenger Hunt
First Post
Number Posts (3/10)
Number Threads Started (1/10)
Number Likes Received (0/3)
Number Likes Granted (0/3)
Set bumper stickers in profile (0/1)
Set signature in profile
Search for a post/thread (0/3)
Set a watch on a thread
Save thread as a bookmark
Create a post with an image (0/1)
Recent posts by Vladimir Yatsevskiy
Overload resolution issue
Matthew Brown wrote:
Hi Vladimit. Welcome to the Ranch!
.
Thanks. actually my name is Vladimir. I sent request for fix this misprint. thanks for you answer.
show more
11 years ago
Java in General
Overload resolution issue
P.S. i know about this
rules
.
show more
11 years ago
Java in General
Overload resolution issue
Could someone explain how java compiler work in this situation?
class Main { public static void main(String[] args) { Correct c = new Correct(); c.f(1, 1); //compiler know which method should it invoke Wrong w = new Wrong(); //w.f(1, 1); // Compiler error } } class Correct { public void f(int a, Integer b) { System.out.println("int, Integer"); //all is ok } public void f(long a, Integer b) { System.out.println("long, Integer"); //all is ok } } class Wrong { public void f(int a, Integer b) { System.out.println("int, Integer"); //ambiguous! } public void f(Integer a, long b) { System.out.println("Integer, long"); //ambiguous! } }
show more
11 years ago
Java in General