Santhosh Raje

Greenhorn
+ Follow
since Sep 26, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Santhosh Raje

Hi All,
Can anyone explain me about both
17 years ago
Hi Anth,
As you know the default delimiter is white space for a Scanner.
So when you pass the String which in this case is a single word,the scanner.hasNext method returns true for the first time so it goes inside the loop and prints the value using next() method.
After this when it goes into second time this time the while(false) since there is no other word present in the string ...

Hope this explains you something
Hi Marcin,
Congratulations for a Great Score.
Can you tell me How much is this Whizlabs ,Is it Free or If Payable How much dollars i need to pay.


Regards,
Santhosh
17 years ago
Hey,
Since the final variable inside the method is a constant whose value is not going to be changed ,Hence even if there are multiple instances of Inner class objects the value of this variable is not going to be changed.
Hi Sai,
The Final Reference Variable which is pointed to String array object is not changed.So no error occurs.Since I dont know how the for each method is internally implemented I cant say anything beyond this.
Hi Ankit,
You are right that "Assertions are disabled by default" .
So During runtime of the code if they are not enabled then there wont be any output.
If assertions are enabled then the output will be an Assertion Error.
Hey,
Here there are two methods one takes short while other one takes float,
Since we passed a int value ,the method with float argument is taken and printed float.
Since For Short you know that 16 bit is the range while for float it is 64bits.
Assigning Wider Conversion is allowed ,while Narrowing the conversion then we need to use casting for it.
Hey,
Here After line 10 ,the CardBoard objects at line 9 becomes eligible for Garbage Collection since c2 is made to point to null while calling in method go().
At line 11 ,the CardBoard object present in line 8 becomes eligible.
Hence two cardboard objects becomes eligible for Garbage Collection.

I dont understand why Short object story becomes elligble for Garbage collection.
Hey ,
Just some input on what I know on Greedy Quantifiers is that
The Source:yyxxxyxx and the Pattern:*.xx
Here the Pattern is matched for this particular source.
What happens during matching is the Condition is that From the source match for tokens that end with xx.
So the JVM can interpret as yyxx as one token or yyxxx as another token and last xyxx as another token(Totally:3)
While the actual number of tokens what we expect is 2.

So they kept the name as Greedy Quantifiers