[java programming] Re: Cast

2009-02-17 Thread mcmcalex
Remember int isn't a class, it's a primitive. if you have an Object, you can cast it to an Integer, and then use Integer's intValue() method to find the int. hth mcalex On Feb 17, 3:18 pm, "Ashis Mohanty" wrote: > can any body say to me that > > how can i cast from Object to int type. > > Thank

[java programming] Re: command line arg

2009-02-09 Thread mcmcalex
I think the OP was asking 'how do i pass arguments to main() in JCreator?' As miga said, there will be JCreator info out there (eg http://www.jcreator.com/faq.htm), but this isn't the place. The code is fine as it is. On Feb 10, 2:00 am, Żukowski Michał wrote: > Hi > > Yes Maciej you're right,

[java programming] Re: package java classpath command call windows.

2009-02-09 Thread mcmcalex
Check that '.' in the name of your Documents and Settings directory. It looks like java changes it to a slash as if it were in a subdirectory. Perhaps cd to the NetBeansProjects directory and try running it from there with java -classpath . foodpackage\FoodMain - but i'm not sure that is the 100%

[java programming] Re: Hello World

2008-12-17 Thread mcmcalex
errr, no, you don't need to include the '.exe'. The command line will look for a file with the name specified anywhere on the path. If the file specified exists, and has an extension of either .exe, .bat, or .com the command line will run it. If the command works when you put the .exe and doesn

[java programming] Re: LAB 1036 : Java Array : How to use Split Function for Array using Looping Structure

2008-11-24 Thread mcmcalex
Hi Ravi, split() returns an array. firstName[i] is a String > My thoughts are like this.. > Full Name = Ravi Nazre > So First Name is Ravi and Last Name is Nazre. > > here fullName= Ravi Nazre > if i Use > firstName[ ] = fullName[].split(" "); > > It should store First Name NO. It will store '

[java programming] Re: What are the difference between these terms?

2008-10-30 Thread mcmcalex
Here's a bunch: http://en.wikipedia.org/wiki/Java_version_history and http://en.wikipedia.org/wiki/Java_SE A hint: append 'site:en.wikiepedia.org' to your google queries when you need an encyclopaedia or reference type answer. hth mcalex On Oct 30, 9:56 am, "Norman Ho" <[EMAIL PROTECTED]> wro

[java programming] Re: Help with "Cannot find symbol" error

2008-10-27 Thread mcmcalex
Hi aa Because you have created a constructor of your own, the default constructor (that is normally automagically created if you don't have a public constructor) doesn't exist. You need to add a public default (no-arg) constructor. hth mcalex On Oct 27, 10:05 am, apple_amateur <[EMAIL PROTECT

[java programming] Re: Annotations lesson

2008-10-16 Thread mcmcalex
i think it should be ... variableName = "id" ... hth On Oct 16, 4:10 pm, erik <[EMAIL PROTECTED]> wrote: > exercise 3.1: Multiple member annotation > > But what does the line >   @Accessor(variableName = "name", variableType = "int") > > actually **do**  for me ? --~--~-~--~~

[java programming] Re: Integer vs primitive type integer?

2008-10-06 Thread mcmcalex
> then each num[counter] must be an *Integer object*, not primitive one. No, check the javadoc for the parseInt method of Integer. It returns an int, not an Integer. hth mcalex On Oct 6, 2:11 am, "Le Phan" <[EMAIL PROTECTED]> wrote: > Hello everybody, > I have a question about the example "

[java programming] Re: LAB-1025 Ex.3 "super" question

2008-09-23 Thread mcmcalex
The classwork for that lesson is a bit confusing. I think Norman meant to say: I don't think the super call inside the class constructors should be hard coded __with arguments that don't relate to the constructor__. In other words, the line: super(150, "Sun press", 1978); should not be part of t

[java programming] Re: hw 1011 static method confusion

2008-09-23 Thread mcmcalex
oh, lookie ... a forum. :-) Sorry, didn't know about this. I've been keeping up with the group via email only. On Sep 23, 4:26 pm, miga <[EMAIL PROTECTED]> wrote: > On Sep 23, 9:44 am, Norman Ho <[EMAIL PROTECTED]> wrote:> On the purist point > ... are we supposed to use instance mehtod like