473,323 Members | 1,537 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Main Method Question

176 100+
Hello guys. I have a question about the main method of a program. Is there any difference between typing
Expand|Select|Wrap|Line Numbers
  1. public static void main(String[] args) {
and typing
Expand|Select|Wrap|Line Numbers
  1. public static void main(String args[])
Thanks.
May 21 '08 #1
3 1016
BigDaddyLH
1,216 Expert 1GB
Hello guys. I have a question about the main method of a program. Is there any difference between typing
Expand|Select|Wrap|Line Numbers
  1. public static void main(String[] args) {
and typing
Expand|Select|Wrap|Line Numbers
  1. public static void main(String args[])
Thanks.
There is no difference. The first way is generally preferred.
May 21 '08 #2
Kid Programmer
176 100+
There is no difference. The first way is generally preferred.
Thanks I understand.
May 21 '08 #3
BigDaddyLH
1,216 Expert 1GB
Thanks I understand.
Pop quiz: are these the same?

Expand|Select|Wrap|Line Numbers
  1. int []a, b;
  2.  
  3. int a[], b;
May 21 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Jacek Dziedzic | last post by:
Hi! First of all, I hope my problem is not too loosely tied to the "standard C++" that is the topic of this group. I have some code that exhibits a strange behaviour: on one computer, where I...
4
by: ambar.shome | last post by:
Hi, Please take a look at the code snippet given below:#include<iostream> using namespace std; class A { public: virtual void test(){cout<<"Default implementation called"<<endl;}
7
by: David Elliott | last post by:
I have created an application that will dynamically load other DLLs (plugins). The new plugin is a winform with an embedded IE Browser. I am wanting to have the form to run in its own thread....
5
by: lzh_gladiator | last post by:
Hello Every one I am a begginner in C# programming,recentry i have met one question,How do I try and catch Exception in the Main Method.It seems that dot net do not wish to try and catch in the...
5
by: Hao L | last post by:
For example, void WorkerMethod() { ... UnregisterAllHotkeys();} void UnregisterAllHotKeys { for(...) {UnregisterHotKey(...);}} UnregisterHotKey is an API function that must be on the thread...
2
by: Charlie Tame | last post by:
Definitely a newcomer to C# (in fact to any programming after some years away) and I'm finding lots of examples but they are sometimes confusing. My concept of (say) QuickBasic was that you write...
8
by: garyusenet | last post by:
The following piece of code appears in an example i'm reading after the class has been named. public string userMessage; However if i move that into my main method, i'm told that the keyword...
4
by: chandu | last post by:
Hello, I had one doubt,please clarify it. Main is the entry point for the application. if i had multiple overloaded main methods in my application. how the compiler recognizes the original...
12
by: Tomaz Koritnik | last post by:
Is it possible to asynchronously call a method from worker thread so that this method would execute in main-thread? I'm doing some work in worker thread and would like to report progress to main...
4
by: lilyumestar | last post by:
I have project I have to do for class. We have to write 4 different .java files. Project2.java HouseGUI.java House.java HouseSorting.java I already finish House.java and I need to work on...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.