File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Simple questions from a novice

 
vamsi acharya
Ranch Hand
Posts: 55
Android Chrome Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys , all you java geniuses out there ...i have some simple questions ......

1.) can we write a main method without conventional (String args[]) ???If so or not, why and how ??

2.)can we override a main method ???If so ,give me an example please !

3.) Is documentation of JAVA can be called as API ??
 
Henry Wong
author
Marshal
Pie
Posts: 20836
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, the best way to learn, and grow past being a novice -- is to try the questions out yourself.

What do you think the answers should be? And why? And have you tried it out yourself? Write a program to test your speculations.

Henry
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33716
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
vamsi acharya wrote:3.) Is documentation of JAVA can be called as API ??

This one isn't really something you can try yourself. The JavaDoc is in fact an API.
 
bhavesh bhatnagar
Greenhorn
Posts: 26
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1.) can we write a main method without conventional (String args[]) ???If so or not, why and how ??
2.)can we override a main method ???If so ,give me an example please !


Yes you can write
but that will be an overloaded method
[ You can have any number of main()]

eg


class MainMethodTesting
{

public static void main()
{
System.out.println("Without Main");
}

public static void main(String[] args) {
MainMethodTesting.main();
}

}


Also note: Program can also be executed witout main().. using static block

 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
vamsi acharya wrote:3.) Is documentation of JAVA can be called as API ??

API means Application Programming Interface - in the case of Java, it's the set of classes, interfaces and methods that are in the standard Java library. Ofcourse there is documentation of the API.
 
Campbell Ritchie
Sheriff
Pie
Posts: 47300
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, you cannot override the common main method because it is static. We have an FAQ about that: look at no 16.
 
vamsi acharya
Ranch Hand
Posts: 55
Android Chrome Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so JAVA API is a part of a JavaDOC???
 
Ulises Pulido
Ranch Hand
Posts: 81
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
vamsi acharya wrote:so JAVA API is a part of a JavaDOC???


Errr I believe is backwards, the Java Doc is part of the Java API
 
Campbell Ritchie
Sheriff
Pie
Posts: 47300
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Javadoc is a tool used to convert documentation comments to the html pages with descriptions of the API. Lots of people call the documentation comments "javadoc" but that isn't really correct.
 
Steve Jefferson
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Experiment yourself dude and refer to Java API(Yes,the documentation) for the methods you need. Java tutorial from Sun will help you much as a novice.
 
vamsi acharya
Ranch Hand
Posts: 55
Android Chrome Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone distinguish between API and documentation of Java???
 
vamsi acharya
Ranch Hand
Posts: 55
Android Chrome Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Steve Jefferson wrote:Experiment yourself dude and refer to Java API(Yes,the documentation) for the methods you need. Java tutorial from Sun will help you much as a novice.


Can you provide me the URL ???
 
Gamini Sirisena
Ranch Hand
Posts: 378
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
to put it succinctly..

I would say an API is a collection of interfaces and classes with constructors and methods and fields that allows one to use the functionality of the said collection of software components.

"API documentation" is some documentation which describes the API making it easier for a developer to use the API

Java documentation in general may be the sun java tutorials , other on line resources, above mentioned API documentation etc.
 
vamsi acharya
Ranch Hand
Posts: 55
Android Chrome Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you gamini
 
Gamini Sirisena
Ranch Hand
Posts: 378
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Glad to have helped
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic