• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Oracle documentation  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am fairly new to Java and struggling in understanding oracle docs online. Could anyone please explain how I can understand the oracle java documentation I know its very good resource to know java library but unfortunately I am having difficulty in implementing those concepts. e.g. I don't understand in detail how can I implement FilenameFilter into my program. However, I have found many examples to implement it but I want to understand it from the information provided in oracle doc and how to implement it utilising just that information. I am sorry if I am bit confusing. Many Thanks,
 
Marshal
Posts: 56600
172
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

The API documentation is not intended to be a tutorial. It provides the formal specification and contract for all the classes and methods. It can be very specific (e.g. Object#equals) or intentionally very vague (e.g. Collection#add). It is written on the assumption that readers can already program.
you should look through the Java Tutorials. You won't find FileNameFilter in it but you will find something in its documentation: it is used in the Abstract Windowing Toolkit (AWT). Nobody uses AWT any more; it has been largely superseded by Swing and JavaFX. You will find FileFilter is used by file choosers, and there is a section about file choosers in the tutorial I linked to earlier.
 
Ranch Hand
Posts: 50
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Adil Hassan wrote:Hi all,

I am fairly new to Java and struggling in understanding oracle docs online. Could anyone please explain how I can understand the oracle java documentation I know its very good resource to know java library but unfortunately I am having difficulty in implementing those concepts. e.g. I don't understand in detail how can I implement FilenameFilter into my program. However, I have found many examples to implement it but I want to understand it from the information provided in oracle doc and how to implement it utilising just that information. I am sorry if I am bit confusing. Many Thanks,


Please give us more info about what you are trying to do and what is the problem you are facing. Without that information, it will not be possible to help you.
 
Rancher
Posts: 42972
73
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to understand it from the information provided in oracle doc and how to implement it utilising just that information.

That is an unrealistic goal, as Campbell has pointed out. The javadocs are a reference, and the Java class libraries are much too big to be learned by reading through a reference. The Oracle Java Tutorial is a good starting point for many subjects, and beyond that you can search for introductory articles and example online, as you have already found. For particular pieces of the class libraries there may also be decent books available.
 
Adil Hassan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

First of all thank you all. Now all I want is - to learn Java library so that when I program I should know that there is a method available that I can call and achieve what I want to. For example I wanted to filter pdf files from a directory - if I didn't know that a method already exists in java library I would have been spending hours and days just to achieve that (basically reinventing a wheel) but knowing that calling that function would filter pdf files is a relief. Now, the problem is how to call/implement that function in my code by looking at java documentation alone? If it is unrealistic to achieve than I should not worry much about it because my understanding was that when one programs in java they look at java documentation and understand it all and implement the code to achieve their desired functionality. Many Thanks.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if I didn't know that a method already exists in java library I would have been spending hours and days just to achieve that (basically reinventing a wheel).

I'm sure that at some point sooner rather than later it would have occurred to you to search for something like "java filtering file names" - which would have led you to the methods and classes to use pretty quickly.
 
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:
if I didn't know that a method already exists in java library I would have been spending hours and days just to achieve that (basically reinventing a wheel).

I'm sure that at some point sooner rather than later it would have occurred to you to search for something like "java filtering file names" - which would have led you to the methods and classes to use pretty quickly.


Agreed. Having to memorize the complete documentation (and also understand it) because it will mean constantly "reinventing the wheel" is a bit far fetched.

However, it is reasonable to scan the different packages, to have an idea of what is available. And to scan it again, as you are using it... including the method. And finally, to do a deep dive of what you need as you need it (or think you need it).

Henry
 
sid smith
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a simple answer to your question. Google is your friend. Search how to FFF java. See tutorials, articles, forums with related code examples from the search results. Learn and refer API when in doubt. If your doubts are still unresolved, then ask questions on forums. Btw, you would not even be able to learn how to do hello world by just learning the API's , right ?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!