Help with Java objects please!?
817515
Is your object class the one that manage both creation and destruction of instances? \n\nYou could have both a static Create method and a static Destroy method.  Destroy would push instances into an 'unused instances' stack and Create would pop the first instance of that stack and assign new values to it as needed.\n\nThat way you save memory allocation/desallocation.
721341
try SpamAssassin.  i don't remember what language it's in, but it would be a snap to re-write it in Java.
331457
It usually should have called the constructor A() if you are making the object in maner "A a1;" in the main function. But also you have overloaded the operator "()". SO, it makes a confusion and actually none of the output from the above constructors are called. Another thing, its not a good thing to inital values in parameters. I've often faced these problems when I overloaded the "()" operator. For any further questions you can contact me.
457550
for that u have to learn java.go to java.com may be u find help
67281
I'm not exactly sure what you mean?\n\nAre you trying to run a Java application and the main method can not be found?\n\nIs there a specific error message you are seeing that you can add to the details of this question?
1113194
try this\n\nhttp://en.wikipedia.org/wiki/Java_programming_language
124327
You should try downloading Java...
719831
A null pointer exception is caused when the Java program tries to reference something that doesn't exist. Hence the null pointer part.  This sounds to me like there is a problem with the applet, not your computer.  Is it working for others in your class? I would e-mail the instructor right away to let  s/he know you are having problems, that way, if you are unable to resolve the issue, your instructor is likely to be understanding if you get a little behind.
499950
Try Download a Updated Version Of Java from www.java.com \n\nSee if that Helps
44499
Try www.objectdesktop.com it's great !!!
216650
Just go to the link below and download the latest Java SDK.\nHopefully, that would help you.
1127525
- you cannot use new with primitive types\n- primitive types cannot have a null value like object references do\n- primitive types are not derived from java.lang.Object\n- primitive types have no class definition, no members, and no methods\n- as members in objects primitive variables are always Serializable (no need to declare them as such)
755895
Scanner.next() returns a String, and you are assigning it to an int.\nThat's incompatible. Replace it with nextInt() if you expect to read an integer, nextDouble() to get a double etc.\n\nnext time, if you want to get answers from people who actually have programmed in java, I'd recommend that you show a little respect for them by counting your lines yourself, and pointing out where those 21 and 23 are instead of just throwing a page of code, and expecting that somebody will drop what they are doing and fix it for you
883565
If you know the package name (like in your example), then look at this:\nhttp://forum.java.sun.com/thread.jspa?threadID=341935&start=15\n\nTo get to that point from any given object, get the object's class, and then get the Package object.\n\nClass clazz = myObj.getClass();\nPackage package = clazz.getPackage();\nString packageName = package.getName();
338060
An instance in Java is referred to the Memory block where the Object variables are placed on the HEAP. \n\nSuppose we have the following Object\n\nClass obj{\nprivate int a;\nprivate int b;\n\npublic int Sum(){\nreturn a+b;\n}\n\n}\n\nnow this Objecet (obj) is instanced as follows\n\npuiblic static void main(String argv[]){\nobj myObj = new obj(); //Creates an instance of obj on the heap\nint a =myObj.Sum();//Call to the sum method of the obj class\n}\n\nWhen a class in instantiated all the PUBLIC methods are in scope of the calling class
464216
Phew given yourself a task here laddie....\nAnyhow go to www.wrox.com and they have a whole section dedicated to java,(and just about everything) be patient, be cool and you will get there\n\nGood luck
593709
instead of \ntitle = "Hello World";  \ntry\ntitle.Text = "Hello World";\n\nthe lable object can not be assigned a string value, but the Text property of the lable object can :)