java.io.Console strange code style

Morteza Adigozalpour mortezaadi at gmail.com
Sun Nov 11 14:17:45 UTC 2018


This is how the class is structured:

-starts with some public methods
-followed by a private method
-more public methods
-fields declaration
-native methods
-private methods
-class declaration
-static initializer block
-static field
-a native method
-constructor

I am not sure whether the style guideline (here
<http://cr.openjdk.java.net/~alundblad/styleguide/index-v6.html>) are being
used in openjdk community or not,
based on that I expected something like this,

-Fields
-Constructors
-Factory methods
-Other Methods

 any how regardless of the draft, I believe* java.io.Console* should be
reorganized to increase readability.


On Sun, Nov 11, 2018 at 1:49 PM Pavel Rappo <pavel.rappo at oracle.com> wrote:

> > On 10 Nov 2018, at 20:06, Morteza Adigozalpour <mortezaadi at gmail.com>
> wrote:
> >
> > I was reading java.io.Console class, I wonder why the class organized
> like
> > this!
>
> Could you be more specific?
>
>


More information about the jdk-dev mailing list