Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!

Ranji Sura

Ranch Hand
+ Follow
since Oct 28, 2012
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ranji Sura

Hi.. Please look at this...

8.1.1. Class Modifiers

The modifier static pertains only to member classes (§8.5.1), not to top level or local or anonymous classes.

An anonymous class is always an inner class (§8.1.3); it is never static (§8.1.1, §8.5.1).

So, if it is anonymous class, it can't be an inner class and it can not be static
But static pertains only to member classes

What do you think .. ?
Is this anonymous class or member class ? It certainly doesn't have a name though..
5 years ago

Qiang Qiang Xi wrote:It doesn't work and I am not allowed to change the function for testing only

What do you mean by it doesn't work.. ? Are you still getting same exception ?

Are you sure about this code ? I am not sure with this code.. What is Display ? Shell ?
MouseEvent,from which package you have imported it ? in java.awt.Event there is no such Constructor like MouseEvent(Event event)

So.. If you don't mind check your code again..
If you don't get any solution.., Let's wait and see what other peoples have to say ?
5 years ago

Mansukhdeep Thind wrote:That is the whole point of JavaRanch. Finding the "WHAT happens when" is easy. It is the "WHY IT HAPPENS SO" which interests me?

Hi buddy.. Let me ask you something...

I know this occurs a compile time error.. But now I also want to know why ?
Can't it treat like int[][]y ?
5 years ago
Hi, Buddy...

I think , you should see this...

The [] may appear as part of the type at the beginning of the declaration, or as part of the declarator for a particular variable, or both.
For example:

byte[] rowvector, colvector, matrix[];

This declaration is equivalent to:

byte rowvector[], colvector[], matrix[][];

But don't ask me why.. ? like what I did with "final variables". do you remember... ?
5 years ago

Winston Gutkowski wrote:
Yes, but the specification says 'innermost enclosing'. So: what's the innermost enclosing loop?

OK. Now I have a question.. ? (By the way, You makes me really learning..)

Let's take your example again..

Which loop is the innermost enclosing loop here ? Line number 6 or Line number 8 ?
Really looking forward your reply now..
And furthermore like to know what is break target here ?
5 years ago
OK. Try with this..
Does it work for you... ?
5 years ago
OK. This is what I want to know...

Let's put your for loops in a method ... OK.. like this...

and please keep in mind this definition for the innermost

innermost : - Farthest in

Now, can you guess.. ?
5 years ago
Dear sir, then I would like to ask you,,, What is the innermost enclosing for statement of the immediately enclosing method here... ?

First for loop or second for loop ?
5 years ago

Qiang Qiang Xi wrote:for output, you mean the error message??

No, I mean what is the output if you run below code... ?

5 years ago
Can you show the output of this code please... ?

5 years ago

while and do..while are NOT the same. One evaluates 'expression' before it executes its contents, the other one after.

Yes, it is, but it is not what I am trying to suggest...

and I think this is pointless thing to talk..

Before quit.. I would like to ask, dear "Winston Gutkowski"

A break statement with no label attempts to transfer control to the innermost enclosing switch, while, do, or for statement of the immediately enclosing method or initializer; this statement, which is called the break target, then immediately completes normally.

the innermost enclosing switch, while, do, or for statement of the immediately enclosing method or initializer
What does it mean... like to know what do you think above line... ?
5 years ago

Winston Gutkowski wrote:

Ranjith Suranga wrote:
@Ranjith: If you see long lines in a post, please don't copy/quote them.

Got it.. It is extremely thank you for showing my faults..
5 years ago

I still cannot manage to pass the loop

What do you mean by it... ? are you still getting an exception although checking the reference is null ?
5 years ago
Try this buddy...
5 years ago