what is the use of capacity method in StringBuffer

L

Lew

Stefan said:
According to the JLS, the properties of a named entity are are
the /accessibility/ or whether a named method is
»synchronized« or so.

Beyond that, objects do not have »properties« by the JLS.

Beans might have properties - but that is another
specification, which does not apply to Java in general.

The thing about style guides is that they are about style, and they merely guide.

If style were universal there would be no one on Mr. Blackwell's
10-worst-dressed list.
<http://en.wikipedia.org/wiki/Mr._Blackwell>
 
C

Charles Hottel

Roedy Green said:
Getters and setters, as they are now, reek of kludge. I imagine the
guy who invented them has an office full of mouldy pizza boxes and old
Styrofoam coffee cups. This is one reason I want more female
programmers. I would hope they would balk at such bailing wire.

What do you recommend that we use in their place?
 
W

Wildemar Wildenburger

Charles said:
Getters and setters, as they are now, reek of kludge.
[snip]

What do you recommend that we use in their place?
Like Roedy proposed. Public attributes. Augmented to be "Properties" or
"managed attributes".

Python (I feel a little guilty for bringing it up constantly) has them
and they're great.

/W
 
W

Wayne

Roedy said:
I want the language changed, to behave something like C#, Eiffel or
Delphi. My proposal is in my Bali document.

See http://mindprod.com/jgloss/bali.html

For now, there is no alternative.

The Powers That Be must be reading your site; many of your
suggestions (enums, assertions, for-each loops, ...)
have now been included in Java. Maybe you should update
this document with new "wish list" items, you never know!

-Wayne
 
L

Lew

Wayne said:
The Powers That Be must be reading your site; many of your
suggestions (enums, assertions, for-each loops, ...)
have now been included in Java. Maybe you should update
this document with new "wish list" items, you never know!

"Now"? Assertions were added in 2002 (and in beta in 2001), enums and
for-each in 2004, back when autoboxing, varargs, generics and the corrected
memory model were brought in.

The other features of Bali make it an interesting language to target for the JVM.

One nit - the bali site mentions
Java’s modulus [sic]

operator. Java does not have a modulo operator, as Roedy points out elsewhere
on mindprod. He also points out that "modulus" is an informal name, which it
truly is.

<http://en.wikipedia.org/wiki/Modulo_operation>
discusses the matters involved in implementing modulo vs. remainder
operations, and has a chart showing how various languages treat the issue of
signed operands.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,434
Messages
2,571,689
Members
48,796
Latest member
Greg L.

Latest Threads

Top