Forums Register Login

Autoboxing question

+Pie Number of slices to send: Send
Following code gives compile time error at line //a. Should it not use autoboxing to convert int(primitive) to Integer(wrapped).



Thanks in advance.
+Pie Number of slices to send: Send
Are you certain you're compiling with Java 1.5? It works fine for me.
+Pie Number of slices to send: Send
 


javac -J-version


Use this to see your compiler version
+Pie Number of slices to send: Send
Thanks for advising me to check version of java. Which actually seems the problem, However I am not able to establish which version I am using while in TextPad. But when I check at Dos prompt it gives me as under :

C:\Documents and Settings\Windows 2000>javac -version
javac 1.5.0_02

C:\Documents and Settings\Windows 2000>java -version
java version "1.5.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b09)
Java HotSpot(TM) Client VM (build 1.5.0_02-b09, mixed mode, sharing)

Good news is that compilation and execution works at Dos prompt.

Any idea how to check java version while in Textpad.

FYI, I strongly believe that I have only one version of Java on my PC and that is 1.5.0_02.
+Pie Number of slices to send: Send
Few other things which I tried:
1. uninstalled TextPad and Installed again but still same problem.
2. in TextPad/Tools/Run I tried to run "Javac -version" and I got "javac 1.5.0_02"
+Pie Number of slices to send: Send
I installed Jbuilder yesterday which screwedup the setting. I uninstalled JDK as well as TextPad and installed again. JDK first and then TextPad and that fixed the problem. Thanks.

Veer
Never trust an airline that limits their passengers to one carry on iguana. Put this tiny ad in your shoe:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 915 times.
Similar Threads
Collections
Vector.toArray(object [] a) ?
Enumeration
Mixing genric and non-genric code in assignment
Correction for the given code fragment
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 01:03:01.