Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > error in main method

Reply
Thread Tools

error in main method

 
 
akash walia akash walia is offline
Junior Member
Join Date: Feb 2012
Posts: 1
 
      02-23-2012
why any variable that is intilised in main method in java doesnot print anything.infact it is given error..like


class r
{
public static void main(string a[])

{
int r;
system.out.println("r"+r); //error
}
}
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What will happen if main called in side main function? Ravi C Programming 17 04-01-2006 10:08 PM
int main() or int main(void)? Frederick Ding C Programming 10 12-04-2005 12:44 AM
adding main.aspx.vb & main.aspx.resx under aspx John M ASP .Net 1 05-29-2005 09:27 PM
int main(int argc, char *argv[] ) vs int main(int argc, char **argv ) Hal Styli C Programming 14 01-20-2004 10:00 PM



Advertisments