File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Cattle Drive and the fly likes Java 6 : Grains clarification of purpose Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Java 6 : Grains clarification of purpose" Watch "Java 6 : Grains clarification of purpose" New topic

Java 6 : Grains clarification of purpose

Jeremy Medford
Ranch Hand

Joined: Jan 16, 2007
Posts: 44
Can you possibly clarify this purpose a little more? The boundaries for these are easily looked up.

Purpose: To learn the boundaries of int and long (accuracy), to become more familiar with the java libraries.

In addition the Java 1.4 link is a bit dated, correct? You are taken to a 'End of Life' page.

Thank you,
Katrina Owen

Joined: Nov 03, 2006
Posts: 1367
Hi Jeremy,

Indeed, they are easy to look up - so that part of the assignment is quickly accomplished.

Marilyn de Queiroz

Joined: Jul 22, 2000
Posts: 9059
And what you might do when you need something beyond that boundary.

"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
James McLeod

Joined: Oct 16, 2008
Posts: 6
I'm curious to know what the Instructor did in the 35 lines of code. My solution was 13 lines. And, I never did figure out what I was suppose to find the API (whatever version). What am I missinig?

James McLeod

class Grains {
[code removed by Pauline]

[Sorry, James, we ask not to post code in the Cattle Drive. It's so others who want to figure it out for themselves can do just that. Oh, almost forgot - welcome to JavaRanch and the Cattle Drive! - Pauline]
fred rosenberger
lowercase baba

Joined: Oct 02, 2003
Posts: 11955

For one thing, the cattle drive specifies java 1.4. the printf method you use is not available until 1.5.

second, your code does not conform the Style guide.

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
K. Tsang

Joined: Sep 13, 2007
Posts: 3131

Interesting my own version doesn't compile under 1.4 hmm

K. Tsang JavaRanch SCJP5 SCJD OCPJP7 OCPWCD5 OCPBCD5 OCPWSD5 OCMJEA5 part 1 part 2/3
I agree. Here's the link:
subject: Java 6 : Grains clarification of purpose
It's not a secret anymore!