Thread: Integer Usage
View Single Post
  #4 (permalink)  
Old 01-23-2008, 06:18 AM
CaptainMorgan's Avatar
CaptainMorgan CaptainMorgan is offline
Moderator
 
Join Date: Dec 2007
Location: NewEngland, US
Posts: 841
CaptainMorgan will become famous soon enoughCaptainMorgan will become famous soon enough
Send a message via AIM to CaptainMorgan
K, now you can do this in one of a multitude of ways, depending on your design intent. Here's two ways.

1) Set all your fields to static(put the static keyword before each int keyword in your class).
or
2) Instantiate a Math object and reference the fields to compute the values(Math m = new Math(); System.out.println(m.a).

See how you do with that.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
to our beloved Java Forums!
(closes on September 4, 2008)
Want to voice your opinion on your IDE/Editor of choice?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
!
Got a little Capt'n in you? (drink responsibly)
Reply With Quote