Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

alternative to I/O  RSS feed

 
mic ta
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
are there any other alternatives to Apache commons in order to type less eg. for http://www.java2s.com/Code/JavaAPI/org.apache.commons.lang/StringUtilsreverseStringstr.htm ?

Best regards,
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure what you are asking here. Are you saying you have to type too much if you use Apache Commons?
 
mic ta
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have to much typing if I use Java without Apache commons, but I am looking for something where I could type less than with Apache commons.
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In other words you are complaining because the method names are longer than you would like?
 
mic ta
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would be nice to have something like this:


Are there any frameworks they can do?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
System.out.println(new StringBuffer(a).reverse()) ?

In all my years of programming, I can't remember a time I've ever needed to reverse a String.
 
mic ta
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you. I have tried this howto ( http://commons.apache.org/lang/api-release/org/apache/commons/lang/StringUtils.html#join%28java.lang.Object[],%20java.lang.String%29 )


But I have got the errors:


What did I wrong?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The example isn't valid Java code; it's just some random dude's way of writing examples, I guess. I think that "*" is intended to mean "any string", and things enclosed in square brackets "[]" are intended to mean "this stuff in an array".
 
mic ta
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this the only correct way or is something shorter instead of new String[] {}?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!