The Artima Developer Community
Sponsored Link

Java Answers Forum
Newbie

1 reply on 1 page. Most recent reply: May 30, 2006 11:48 PM by Kondwani Mkandawire

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Edd Ghad

Posts: 1
Nickname: eeek
Registered: May, 2006

Newbie Posted: May 30, 2006 9:56 AM
Reply to this message Reply
Advertisement
Hi I am a newbie to the forums.
I am derusting my java skills, just say it's been a while when I last hacked at it-and even then I'm a rank novice.

I came across a fairly good o'rielly book (Head first Java).I'm hacking with 1.4.2 I think it is-it's what ever the latest greatest 1.4 java SDK is around.

I ran into some interesting questions-
Is their a clean way to work with primitives, such as numbers in 1.4, I can always 'upgrage' to 1.5 that suposedly adresses these problems.

I ran into this when i was horsing around with a early example- that wants you to declare a int size variable, give it three different vallues.

When I made them fairly big I got:
-2389127389172910102389908 is to big for int!
Making it a BigInteger results in incomatible type errors.
(I do realize that a large amount of this is well beyoned anything I'm likely to run into for quite sometime.)


Kondwani Mkandawire

Posts: 530
Nickname: spike
Registered: Aug, 2004

Re: Newbie Posted: May 30, 2006 11:48 PM
Reply to this message Reply
> I came across a fairly good o'rielly book (Head first
> Java).I'm hacking with 1.4.2 I think it is-it's what ever
> the latest greatest 1.4 java SDK is around.

Actually 1.5 is the latest and there is a beta-version of 1.6 which concentrates on JavaDesk Top capabilities.

> I ran into some interesting questions-
> Is their a clean way to work with primitives, such as
> numbers in 1.4, I can always 'upgrage' to 1.5 that
> suposedly adresses these problems.

You probably should update to Java 5 better sooner than
later. Coz when you try to port old Java 4 code to Java 5
a few things might coz complications down the road on
larger problems. Introductions of new Keywords such
as enum will cause you problems if you have used this as
a variable.

Also you are right. There is auto-boxing in Java 5
e.g. switching between type Integer and primitive int
is much easier and in most cases does not have to be
explicit.

> I ran into this when i was horsing around with a early
> example- that wants you to declare a int size variable,
> give it three different vallues.
>
> When I made them fairly big I got:
> -2389127389172910102389908 is to big for int!
> Making it a BigInteger results in incomatible type errors.

Sorry its winter in Joburg and my brains numb so I can't respond to this at the moment. Though its the same thing
as the passage above (Autoboxing). You can Google it, if you've used Java before the section on Autoboxing on the
Sun website will get you started on this less than an
hour.

> (I do realize that a large amount of this is well beyoned
> anything I'm likely to run into for quite sometime.)

Flat View: This topic has 1 reply on 1 page
Topic: 3D Libraries Previous Topic   Next Topic Topic: Communicate with two JFrames

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use