C Bryant

Greenhorn
+ Follow
since Mar 29, 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
1
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 C Bryant

Don't understand why I should need a cast in this case?

Seems like the Calendar should be smart enough to know that it has a clone() method. I would have expected start.clone() to return an object of type Calendar, not of type Object.
11 years ago
later dude. work to do.
11 years ago
Eclipse Indigo running Java 1.6 with Java 1.5 compliance on a Mac.

Seems like we are splitting hairs. The syntax shouldn't be that fragile.

So, if I stand on my head, and touch my right elbow, and hold down the Shift key . . . .
11 years ago
Sure, that's cool, and simpler, too. Thanks!

Only the second one doesn't compile?

How about these three?



01. Compiles, albeit with an "unchecked conversion" warning.
02. Does not compile.
03. Cut and pasted from the JavaDocs 1.6 API does not compile.

What gives? I want to assign to a List, because I do not want to write to implementation classes. I want to code to interfaces. Stooges, indeed!!
11 years ago
Yes well, that was sort of the point of the example. The code looks like it should work to me. It makes logical sense syntactically.

Why should there be a two step process? 1. Create the String array. 2. Convert the array to a list? Why can't I do this all in one statement?
11 years ago
But, not the following?

11 years ago