• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem in using System.in

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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);
}

}
}
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic