core java 1 Answer(s) 3 years and 3 months ago
Posted in : Java Beginners
1. What are the Advantages of Java? 2. What are the Differences between c,c++ & java? 3. Where we need to Write Java Programs? 4. Explain public static void main(String args[]) 5. What is the purpose of String args[],what happens if we dont mention?
1)Java is pure object oriented programming language but c/c++ is not.
2)Java is platform independent but C/C++ is not.
3)Java is consistent,compact and portable but C/C++ is not.
4)Java has safe and secure execution environment in comparison to C/C++.
5)C/C++ compilers supports preprocessor but Java does not have a preprocessor.
6)C/C++ uses pointer but java does not support.
7)Multiple inheritance is a feature of C++ but java does not support multiple inheritance.
8)C and C++ have no built-in support for text strings but in Java, strings are implemented as first class objects.
***************
3)You can use NotePad, EditPlus, Eclipse or NetBeans
***************
4) The method is public because it be accessible to the JVM to begin execution of the program.
It is Static because it be available for execution without an object instance. you may know that you need an object instance to invoke any method. So you cannot begin execution of a class without its object if the main method was not static.
It returns only a void because, once the main method execution is over, the program terminates. So there can be no data that can be returned by the Main method
The last parameter is String args[]. This is used to signify that the user may opt to enter parameters to the java program at command line. We can use both String[] args or String args[]. The Java compiler would accept both forms.
**************
5)It handles command line arguments.IF you won't mention it, you can not handle these arguments.
Thanks
Related Pages:
core
core where an multythread using
Please go through the following link:
Java Multithreading
core java core java how to display characters stored in array in corejava
core java core java Hi,
can any one exain me the concept of static and dynamic loading in corejava
core java core java Hi,
can any one expain me serialization,Deseralization and exterenalization in corejava
core java core java surch the word in the given file
CORE JAVA CORE JAVA What is called Aggregation and Composition
core java core java how can we justify java technology is robust
core java core java what is the use of iterator(hase next
core java core java please give me following output
core java core java write a java program to view product details from product table
Core Java Core Java How to execute cmd command through java??
Give Code of them
core java core java its compulsory to save file name and class name is same in java
CORE JAVA CORE JAVA What is Garbage collection in java? What is the role of a developer for garbage collection
core java core java In java primitive variables will get its default value automatically after declaration. Then why it is mandatory to initialize a variable before using
Core Java Core Java Please write a Java Program to design login form and store the values in file & validate and display the MainForm
Core Java Core Java Hi,
Can any one please share the code for Binary search in java without using builtin function
core java core java Hello sir,What is logic behinde the corejava programms,How may programmas are there,for example,sorting of two numbers,grade of the student details,fibonice serice,paldroma,incremting of the program,asscedding
core java core java Hello sir,What is logic behinde the corejava programms,How may programmas are there,for example,sorting of two numbers,grade of the student details,fibonice serice,paldroma,incremting of the program,asscedding
Core Java Core Java What is the significance of static synchronized method?
Why do we have the method declared as static synchronized
core java core java how to compare every character in one string with every character in other string
core java core java what is the max size of array?
You can declare up to maximum of 2147483647
Core Java Core Java Write a Program to add given number of days to the current system date and display the same
Core Java Core Java have to find the prime numbers which is less than the current prime numbers using loops
core java core java can i use native keyword with abstract method ? if yes explain and if no please explain
core java core java Hi,
Can any one please share a code to print the below:
1
121
12321
1234321
CORE JAVA CORE JAVA Tell me some Scenarios why you go for Abstract Class and Interface
Core Java Core Java How to load class dynamically in java ?
To load class dynamically you can use Class class method
Class.forName("abc.xyz.MyClass");
This method load the given class at run time
Core Java Core Java Hi,
can any one please tell me the uses of return type,"Super" and "this" calling statement in Java??
why do we required this,super calling statement??
why return type is required
Core Java Core Java Hi,
Can any one please expain me why derived data types are required in java as we have primitive data types with us
Core Java Core Java Hi,
Can any one please expain me why derived data types are required in java as we have primitive data types with us
core java core java readLine() function is realated to which class?
readLine() is a method of java.io.Console class it is also available in java.io.BufferedReader.
core java core java what is difference between specifier and modifier?
what is difference between code and data?
what is difference between instance and object
core java core java public class Check {
public static void main(String[] args) {
System.out.println(11^2);
}
}
how it is work????
plzz explain
Core Java Core Java Hi,
Can any one please share a code to print the below:
1
23
456
78910
thanks a lot in advance
Core Java CoreJava How can i write own compile time and runtime exceptions in java
Hello Friend,
Please visit the following links:
http://www.roseindia.net/java/exceptions/how-to-throw-exceptions.shtml
http
Core Java Core Java Is Java supports Multiple Inheritance? Then How ?
Hi Friend,
Java does not support multiple inheritance but it can be achieved by using the interface.
In Java, Multiple Inheritance can be achieved through
Core java Core java How to use hyperlink that is href tag in corejava without swing, frames etc.
My code is
StringBuffer oBodyStringBuffer = new StringBuffer("Message Classification: Restricted.\n\n
Core Java Core Java Write a program to read the below data from a file and check whether the period is partial or full month?
03/01/2011 â?? 03/28/2011
03/01/2011 â?? 03/31/2011
02/01/2011 â?? 02/28/2011
02/01/2011 â?? 03/01/2011
Core Java Core Java Write a program to accept the given date in DD/MM/YYYY format and convert the same based on user selection mentioned below?
1.MM/DD/YYYY format
2.YYYYMMDD format
core java core java public static void main(String k[])
Is it possible to pass the Integer type arr instead of String type in main method?(replacing String than Integer)
if possible..
how to write code
core java core java Create a class containing the main method and define an integer array x of length n=5 to find and display their mean.
Mean=?Xi/n
core java core java Create a class containing the main method and define an integer array x of length n=5 to find and display their mean.
Mean=?Xi/n
core java core java Hi,
I am facing problem in adding/inserting an elemnts in array.
can any one please sahre the code for the same without using collection(Built in function)
Regards":
Akash
CORE JAVA CORE JAVA Iâ??ve a string like below
String xyz =â??nullâ??;
I want to compare xyz with space which is in other String ABC.
What will be the output
CORE JAVA CORE JAVA Static methods can be participated in inheritance?
What is static keyword?
What is static keyword?
How to write code for static factory method?
What is mutable and immutable
CORE JAVA CORE JAVA Which collection is more feasible to store unique objects?
Which collection is better to store objects where insertion order should be preserved?
Can we use Enumeration for displaying list objects