Alternatively you can add the path to the directory, where the compiled Hello.class is created, to the CLASSPATH environment variable(though -cp option is the preferred approach).
For details on java classpath read the following link :
http://java.sun.com/j2se/1.4.2/docs/tooldocs/solaris/classpath.html...
User Profile
Collapse
-
http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html...Leave a comment:
-
So I think that what you want is a method to store user input in variable. In that case there is a function scanf using which you can store the values given by the user into variables. Read the documentation for scanf. Its similar to printf....Leave a comment:
-
'double' is a datatype like int and char. (Read about c++ datatypes and you'll find it.)
Btw what is an ibase command?...Leave a comment:
-
Online resources :
http://www.cplusplus.c om/reference/clibrary/cstdlib/malloc.html
http://computer.howstu ffworks.com/c29.htm
http://www.thescripts. com/forum/thread212982.ht ml (A thread on 'theScripts' itself)...Leave a comment:
-
hey dwurmfeld,
could you please give an example of the scenario you've mentioned?...Leave a comment:
-
Sun's java tutorial is always helpful. And there is a section on 'questions and excercises', it'll give you something to work on.
Here is the link which discusses I/O. http://java.sun.com/docs/books/tutorial/essential/io/index.html...Leave a comment:
-
You should realize that in lines 22 to 26 of your code you are replacing the value stored in variable 'number' with a new value. Now this does not make sense when you want to use every value that you read from the file.
Every time you assign a new value to the variable 'number' you loose the previous value, so you better use it before overwriting it. And if you want to use two value simultaneously in some statement then you should...Leave a comment:
-
Ok.
Btw I also did a similar experiment, after fixing the problem by guess work :)...Leave a comment:
-
Hey Jos,
I also got this error the other day. Basically an IOException was thrown and this appeared as the message. So I looked at the doc for IOException but couldn't find anything related.
this should be there in the java docs...right? And if it is there in the java doc, where will I find it?...Leave a comment:
-
A quick google search told me that you've asked the same question on another forum and have been answered.
If you are still not clear about it then read the following :
http://bobobobo.wordpr ess.com/2008/01/25/c-difference-between-struct-and-union/...Leave a comment:
-
In your assignment, going from 1 to user input is the same as going from user input to 1. Basically you have to double the pay for the number of days user has input. So it does not matter if you go from 1 to user input or from user input to 1, the pay gets doubled the same number of times.
So this is what you can do:
1. After reading the users input, check if it is in the valid range of (0,40]. If not then make the user re-enter...Leave a comment:
-
As I am in windows environment, I tried your program by changing the shell scrip to a batch file and it worked fine. I dont know any reason why it should fail for you.
To check the return status of the process use the exitValue method. A successful completion would return 0 exit value....Leave a comment:
-
API Doc for Java2SE 5.0 :
http://java.sun.com/j2se/1.5.0/docs/api/index.html
Really helpful. Keep it bookmarked.
I thought I'll save him the effort to search for it :-D...Leave a comment:
-
Hey i had mentioned that. Before cin>>x(line 27 in the code in my post). Basically cin>>x should be the last statement in the 'while' block.
while(<conditio n>){
//check if max is to be updated
//check if min is to be updated
//update count 'n'
//cin
}...Leave a comment:
-
-
Please add [CODE] tags around your code. Also read the following :
http://www.thescripts. com/forum/faq.php?faq=pos ting_guidelines #faq_how_to_ask _a_question
Coming to errors in your code :
1. The value of variable 'n' is incorrect.
Lets see the flow of the code. By the time line 25 of your code gets executed you have read and analyzed two input values. As the value of n is 1 at this point of time, you should...Leave a comment:
-
1. Sample input and (expected) output would help in understanding the question.
2. Mention your exact problem. I mean if you have an approach then post it or if you have written the code and its giving an error or the output is not as expected then post the code along with the expected output and actual output....Leave a comment:
-
Point noted :)
I had read about not spoonfeeding source code on the forum but I felt he had written most of the logic correctly and was probably making a mistake in initialization/syntax, so I posted the code.
Anyways from now on I'll avoid posting code....Leave a comment:
-
So I'm assuming that you are not clear about the difference between an object and a reference to an object, because that was the key thing to note in Jos's reply.
Read the discussion at the following link about difference between an object reference and object itself. Hope it helps you.
http://forum.java.sun. com/thread.jspa?thr eadID=652356&me ssageID=3836043...Leave a comment:
No activity results to display
Show More
Leave a comment: