Varuna Seneviratna

Ranch Hand
+ Follow
since Jan 15, 2007
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 Varuna Seneviratna

Why aren't the posts in the Eclipse forum are not being answered? I have submitted the following two posts but no answers have come in?
22 hours ago
When the project name is entered and the Create button pressed, Eclipse issues a dialogue box that has the title "Create" and an input box named Module Name with the project name already entered in the input box. The message from the dialogue box says "Discouraged module name. By convention, module names usually, start with a lower case letter". Why does Eclipse 2018-12 ask this question?.
5 days ago
This post is added because the first sentence was not complete in the above post

When the JDK 11 root directory is selected using the search button at Windows -->Preferences--Java--Installed JREs, Eclipse says "No JREs found".But JDK 11 can be added to the list of installed JREs by using the Add button. I would like to know what this means?
6 days ago
If you come into Javaranch using the name and try to log in, An error message is displayed with the following details.

When I try to log in I get the message "An error has occurred." in the page at

. The page further says "most of the time people get this message it is because your browser has gone wonky and is trying to do silly things. Please try restarting your browser or trying a different browser to see if the problem persists. If you are still having problems, please contact us with what you were doing when the error occurred along with the date and time (Feb 10, 2019 5:53:17 PM).

You can also email us at moosesaloon AT javaranch DOT com"

But I am able to post and go through the forums by going to the home page
1 week ago
Why is it not possible to edit a post. I need to add something to a post I submitted.
1 week ago
When the JDK 11 root directory is selected using the search button at Windows -->Preferences--Java--Installed JREs.But JDK 11 can be added to the list of installed JREs by using the Add button. I would like to know what this means?

1 week ago

the length argument is not the size of the source array, but it is simply the number of elements that must be copied.

Ye, you are right, I preassumed the length to be the size of the source array. The relation the has with the size of the source array is that the cannot exceed the size of the source array, isn't it?. For any value equal or less than the source array the expression holds true.
3 months ago
Below is the Java documentation for the arraycopy() function(,int,java.lang.Object,int,int). The documentation says

The number of components copied is equal to the length argument. The components at positions srcPos through srcPos+length-1 in the source array are copied into positions destPos through destPos+length-1, respectively, of the destination array.


How could the components at positions srcPos through srcPos+length-1 be copied?. The length, I believe is the total number of components in the source array. Then if srcPos is 0 the expression srcPos+length-1 evaluates to the index of the last component in the source array. So if srcPos is 0, the documentation is correct But if srcPos is not 0?. What does the documentation actually mean?

3 months ago
The printed output of an octal value is its decimal equivalent.

The output is 72

How to print 0110 to the screen?

5 months ago
The Scanner class documentation describes a regular-expression grammar under Number syntax. Can someone please explain how it works? The Scanner class documentation is displayed below.

A non-ASCII character c for which Character.isDigit(c) returns true
[1-Rmax] | NonASCIIDigit
[0-Rmax] | NonASCIIDigit
( Non0Digit Digit? Digit?
   ( LocalGroupSeparator Digit Digit Digit )+ )
( ( Digit+ ) | GroupedNumeral )
( [-+]? ( Numeral ) )
| LocalPositivePrefix Numeral LocalPositiveSuffix
| LocalNegativePrefix Numeral LocalNegativeSuffix
| Numeral LocalDecimalSeparator Digit*
| LocalDecimalSeparator Digit+
( [eE] [+-]? Digit+ )
( [-+]? DecimalNumeral Exponent? )
| LocalPositivePrefix DecimalNumeral LocalPositiveSuffix Exponent?
| LocalNegativePrefix DecimalNumeral LocalNegativeSuffix Exponent?
[-+]? 0[xX][0-9a-fA-F]*\.[0-9a-fA-F]+ ([pP][-+]?[0-9]+)?
NaN | LocalNan | Infinity | LocalInfinity
( [-+]? NonNumber )
| LocalPositivePrefix NonNumber LocalPositiveSuffix
| LocalNegativePrefix NonNumber LocalNegativeSuffix
Decimal | HexFloat | SignedNonNumber
Whitespace is not significant in the above regular expressions.

6 months ago
How to install the GlassFish integration plugin?. glassfishintegration.jar missing. What is the plugin for GassFish in IntelliJ IDEA?
8 months ago
Yes, I've read it, But it doesn't say or I am not understanding how it says to set up Dropwizard on a machine. Do all the components ex:- jetty and etc .. have to be downloaded?
1 year ago
I wanted to add some information to a post I did But I couldn't find any edit option?

Doesn't Javaranch posts have the edit option?
1 year ago
Can you please explain how to set up Dropwirard on a machine so that it could be used in an Application through import in this
1 year ago