Help coderanch get a
new server
by contributing to the fundraiser

Andry Dub

Ranch Hand
+ Follow
since Nov 06, 2007
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
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Andry Dub

I am so Happy!!!

There was only 1 new question on Console class. I have been preparing for version 5.

My results:

Declarations, Initialization and Scoping - 100%
Flow Control - 72%
API Contents - 100%
Concurrency - 100%
OO Concepts - 90%
Collections/Generics - 90%
Fundamentals - 72%

This forum is great!!! And of course K&B book!!!
16 years ago
Hi!

Is there difference between exceptions typically thrown by JVM/Programmatically and Runtime/Checked exceptions?
Hi, dear ranchers! I am very confused. Why I can add Integer or Short into list, that must contain only parants of Number. And I cannot insert Object while Object is superclass of Number.

Hi, ranchers! Please explain me why first code compiles fine, but second generates compile time error? What is the main idea on this?



Hi! Please explain me why I can't invoke addandDisp with parameters ls1 and object of type Object? What second parameter is allowed with first parameter will be ls1?

I can't understand this behaviour



Output is: NullPointerException



Output is: null
Hi! I wonder, why this code has a compiler error (ambiguous method call). Doesn't widening beat boxing?

public class Pennard {
public static void main(String argv[]) {
Pennard p=new Pennard();
int d=7;
p.doit(d,d); <-compile error here
}
public void doit(long...x){
System.out.println("long...x");
}
public void doit(Integer...x){
System.out.println("Integer...x");
}
}
Thank you, Kelvin! You have helped me.
Ara there negative octal or hexadecimal numbers on SCJP 5 exam?
If they are, how they ara represented?
Thank you!
I didn't know this nuance.
Why this is OK:



But this is compiler error:

public class MyClass {

abstract class A{} <- legal

abstract enum MyEn{MY,YOUR} <- illegal

final class B{} <- legal

final enum MyEn2{OUR,THEIR} <- illegal
}

Why inner class can be marked as abstract or final, but innec enum can't?