Forum: Java Apr 26th, 2008 |
| Replies: 7 Views: 855 you could either get all the digits out into a list or something, and then parse them back into a number in reverse
or just take the input as a string and reverse the string |
Forum: Java Apr 14th, 2008 |
| Replies: 6 Views: 752 can we see more code? for example, what types are all these things? how are they defined? |
Forum: Java Apr 13th, 2008 |
| Replies: 6 Views: 752 This line makes no sense; you are getting the value that is associated with the key "info", and then you are testing whether that value is a key in the hash table? |
Forum: Java Apr 11th, 2008 |
| Replies: 3 Views: 1,156 um... where is your code? |
Forum: Java Apr 8th, 2008 |
| Replies: 4 Views: 480 so lets look at line 112:
truckinfo[i].Set(inputhp, inputmileage, inputyear);
The two references that you dereference in that line are "truckinfo" and "truckinfo[i]". "truckinfo" isn't null... |
Forum: Java Mar 20th, 2008 |
| Replies: 11 Views: 1,149 do you mean, "it doesn't compile"? there are no classes named Widget, Spork, or Grommet; how do you expect to create new objects of those classes? |
Forum: Java Mar 15th, 2008 |
| Replies: 8 Views: 920 yes. (except that in Java the first object is garbage-collected and in C++ it isn't) |
Forum: Java Mar 14th, 2008 |
| Replies: 8 Views: 920 you should read a basic guide to Java
Java consists only of primitive types and reference types (which are kind of like pointers in C). Reference types point to objects, and are named after the... |
Forum: Java Mar 12th, 2008 |
| Replies: 4 Views: 1,326 what exactly is your question?
why can't the classes be separate and you just put each class in its own file?
also the "main" method should be static |
Forum: Java Feb 23rd, 2008 |
| Replies: 4 Views: 1,170 what is "execution via a webpage"? |
Forum: Java Feb 10th, 2008 |
| Replies: 3 Views: 3,182 if "\" were the separator, you would do
str.split("\\\\")
the reason is that the argument to split() is compiled into a regular expression; and characters which are special in regex need to be... |
Forum: Java Feb 9th, 2008 |
| Replies: 5 Views: 4,129 Scanner.next() returns up to the next delimeter, which is a space by default
what do you expect it to do?
if you want to read the rest of the line, you can use the "nextLine()" method |
Forum: Java Jan 30th, 2008 |
| Replies: 6 Views: 3,120 attribute[] attr=new attribute[no_of_attribute];
attr has no_of_attribute arguments
for(int i=0;i<no_of_entity;i++){
i goes from 0 to no_of_entity
for(int j=0;j<no_of_attribute;j++){
j goes... |
Forum: Java Jan 13th, 2008 |
| Replies: 6 Views: 2,627 there are two lines of
Class.forName ("oracle.jdbc.driver.OracleDriver");
in your code |
Forum: Java Jan 12th, 2008 |
| Replies: 6 Views: 2,627 there are two lines where you call that method; you caught the exception for the second one, but not the first |
Forum: Java Jan 4th, 2008 |
| Replies: 17 Views: 2,404 No, those are local variables inside the method. They do not have access modifiers like "private". |