what is the difference between Java Command Line and C
command Line?
Answers were Sorted based on User's Feedback
Answer / sunitha
In C and C++ when you invoke a program, the system passes
two parameters to it:
argc--the number of arguments on the command line
argv--a pointer to an array of strings that contain the
arguments
When you invoke a Java application, the system only passes
one parameter to it:
args--an array of Strings (just an array--not a pointer to
an array) that contain the arguments
Is This Answer Correct ? | 26 Yes | 4 No |
Answer / ankit goyal
In C and C++ when you invoke a program, the system passes
two parameters to it:
argc--the number of arguments on the command line
argv--a pointer to an array of strings that contain the
arguments
When you invoke a Java application, the system does not pass any argument to it.
if passes the arguments in an array of Strings if and only if the arguments are given by the user.
otherwise system does not pas any argument.
Is This Answer Correct ? | 1 Yes | 0 No |
What is the main use of generics in java?
What is the use of using enum to declare a constant?
What is multithreading in java?
What are java packages? What is the significance of packages?
What is string english?
In what type of containers, Border layout is a default layout?
public class AboutStrings{ public static void main(String args[]){ String s1="hello"; String s2="hel"; String s3="lo"; String s4=s2+s3; //to know the hash codes of s1,s4. System.out.println(s1.hashCode()); System.out.println(s4.hashCode()); // these two s1 and s4 are having same hashcodes. if(s1==s4){ System.out.println("s1 and s4 are same."); }else System.out.println("s1 and s4 are not same."); } } Somebody told me that, == operator compares references of the objects. In the above example even though s1 and s4 are refering to same object(having same hash codes), it is printing s1 and s4 are not same. Can anybody explain in detail why it is behaving like this? Thanks in Advance RavuriVinod
What is sorting algorithm in java?
How to convert string to byte array and vice versa?
Why would you desing a J2EE application so user data is entered by way of a JSP page and managed by an underlying Java Beans class?
What’s the difference between callable and runnable?
can java object be locked down for exclusive use by a given thread? : Java thread