• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem in using System.in  RSS feed

 
Abhishek Dhar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello friends i am new in java and have just started preparing in this field i have some problem in how to use system.in and buffer reader. i know its a silly Question asked by me but i need a help in it
below is the program where i want to use system.in so tht i can input the value of int a at the time of run time its a program for writting down a table


class Table
{
public static void main(String[] args)
{
int a;
int b;
int c;

System.out.println("------ The Table Of 2 Is As Given Below -------");
for (b=0; b<= 20; b++)
{
c = a * b;
System.out.println("a" + "*" + "" + b + "=" + c);
}

}
}
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please don't post the same question to more than one forum. See here for an explanation of why I just deleted the other copy of this thread.
 
John Kelty
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would start by reading the relevant Java tutorial:

http://java.sun.com/docs/books/tutorial/essential/io/cl.html

Other pages there might be helpful as well.

--John
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!