This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Java library over crowded Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Java library over crowded" Watch "Java library over crowded" New topic
Author

Java library over crowded

Prasanta Chinara
Ranch Hand

Joined: Jul 20, 2005
Posts: 30
Does anyone share the same opinion that the Java language library is over crowded?

NO offense intended to the designers or any Java lovers; I feel highly overwhelmed to remember everything for real life use or for the SCJP exam.

--------------------------------
Ex1:
class String (methods):
1. int indexOf(int ch)
2. int indexOf(int ch, int fromIndex)
Method(1) can be easily acheived by int indexOf(int ch, 0) ;
--------------------------------
Ex2:
class File (static fields):
1. static String pathSeparator
2. static char pathSeparatorChar
One would be sufficient.
--------------------------------

C, as a language for example so elegantly handles the API.

'appreciate any thoughts.
Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
No. In my point of view it's not. Think in OOPs perspective.
C, as a language for example so elegantly handles the API.

I have seen many people struggling in pointers , memory leaks while working in 'C'. By this I doesn't mean to say 'C' is not so good. Each language has it's own pros and cons.
[ July 27, 2005: Message edited by: Srinivasa Raghavan ]

Thanks & regards, Srini
MCP, SCJP-1.4, NCFM (Financial Markets), Oracle 9i - SQL ( 1Z0-007 ), ITIL Certified
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

The Java API is quite large.

Originally posted by Prasanta Chinara:

C, as a language for example so elegantly handles the API.


But C's original library was tiny, and didn't do much. The ISO standard effectively doubled the size of that library to deal with wide characters -- and it still didn't do much!

Whereas it's true that some methods could be eliminated -- and many could -- I don't find your examples very convincing, especially the first one. You could pass a second argument of 0 all the time -- but why should you have to? It really only matters to people trying to memorize the API. Everyone else appreciates the convenience.


[Jess in Action][AskingGoodQuestions]
Tony Morris
Ranch Hand

Joined: Sep 24, 2003
Posts: 1608
Overcrowded? Or poorly designed?
I agree with the latter. Apparant "overcrowdedness" is a symptom of poor design. A clearer, consistent design appears clear and consistent, regardless of its size.

The fact that the J2SE API Specification is poorly designed is a major pitfall that often goes unnoticed (often times, the symptoms are attributed to some other consequence of the brokenness); worse still, other people design software in a similar fashion, sicne it forms the basis of how they define "correctness" as if it were some authoritative source. Objective analysis skills are missing in the API Specification; do not inherit them!


Tony Morris
Java Q&A (FAQ, Trivia)
Marcus Green
arch rival
Rancher

Joined: Sep 14, 1999
Posts: 2813
Comparing thes standard C API with the Java API is not relevant. The Java API covers a vastly wider range of functionality than the C API.

It makes more sense to compare one of the C++ libaries such as MFC, GTK, wxWidgets, QT or even Visual Bisic. In my limited experience of MFC the Java API is much, much easier to understand. I would be interested in a comparison with the new .NET framework libraries though.

I would suggest that an example where of an over complex Java API is the GridBag layout manager. Interestingly I believe this was designed outside Sun.

Anyway this is not really relevent to Programmer certification so perhaps someone with the right level of magic would close it or move it somewhere moer relevent.


SCWCD: Online Course, 50,000+ words and 200+ questions
http://www.examulator.com/moodle/course/view.php?id=5&topic=all
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1526
I would suggest that an example where of an over complex Java API is the GridBag layout manager. Interestingly I believe this was designed outside Sun.


Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java library over crowded
 
Similar Threads
Array Sizes
Convert a String into a Regular Expression
doubt on char default value...
'if'block ??
Prompt for file name