vijay tidake wrote:But ,Why line 6 is giving me the values as 1.0 1.0
If Im printing the objects it should give me something like Double@hashcode, right.
And if you print the hashcode for both the 'd' and 'e'.They are same
Matthew Sessoms wrote:Sure, thanks for the reply.
Parag P Kulkarni wrote:hi,
I understand the explanations and thank you for that; but I am still confused about one thing....
I have a function "addString(List<? super String> myList) and inside I am adding few String to myList. But when I try to traverse through the list (using enhanced for loop "for (List s: myList)", I am getting compiler error stating following
Type mismatch: cannot convert from element type capture-of ? super String to String
I also tried to use ArrayList like below
But still its throwing compiler error. How would I print what is added?
Campbell Ritchie wrote:Was it line 92? That compiler obviously can't count.
Andreas Svenkson wrote:Hi guys.
I've been playing around a bit with the CLASSPATH env variable and the command line option and I've come to a conclusion, for which I would like to have confirmed if it is unversal or not (across different OSes).
Basically, I have found the following to be true, for both java and javac:
1) If -cp / -classpath is used at the commandline it will override the CLASSPATH env-variable (no news, this is true according to K&B too).
2) If -cp / -classpath is NOT used, and CLASSPATH is set, this will (obviously) be the classpath used.
3) If neither of the above are used/set (CLASSPATH is not set, nor is -cp used at the command line) then the classpath will default to your current working directory.
Number 3 has caused me a little headache. Since I had no idea it would be set to the current workingdirectory under the aforementioned circumstances, I kept wondering how the heck the class files could be found. This is also the rule I would like to have confirmed.
Basically, imagine we are given a test-question where CLASSPATH is not explicitly set, and nor is -cp/-classpath used. Is it then guaranteed that the current working directory will be used as classpath? Is this a guaranteed behaviour across different plattforms?
Regards,
Andreas.
Chinmaya Chowdary wrote:
We can use jsp:getProperty without using jsp:useBean. All we have is set the specified attribute in any one of the scopes(application, session, request, page).