Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #22617

Input from Console

X-Received by 10.66.227.7 with SMTP id rw7mr1603904pac.19.1362061703977; Thu, 28 Feb 2013 06:28:23 -0800 (PST)
X-Received by 10.50.149.132 with SMTP id ua4mr1051180igb.8.1362061703877; Thu, 28 Feb 2013 06:28:23 -0800 (PST)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!xmission!news.snarked.org!newsfeed.news.ucla.edu!usenet.stanford.edu!su1no209565pbb.0!news-out.google.com!ov8ni22355pbb.1!nntp.google.com!jn4no16256266pbb.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.java.programmer
Date Thu, 28 Feb 2013 06:28:23 -0800 (PST)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=122.161.206.44; posting-account=6SonuQoAAACzSakS5dCECcJQe6ylLrzY
NNTP-Posting-Host 122.161.206.44
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <c9d678fe-b7f0-4757-8d4c-ea7454f8b2fb@googlegroups.com> (permalink)
Subject Input from Console
From subhabangalore@gmail.com
Injection-Date Thu, 28 Feb 2013 14:28:23 +0000
Content-Type text/plain; charset=ISO-8859-1
Xref csiph.com comp.lang.java.programmer:22617

Show key headers only | View raw


Dear Group,

I am trying to learn Java. I was trying to write a code for input from Console.

I found two ways to do it. One is by using import java.io.*; and the other is,
import java.util.Scanner;

If I assign a class name and start the console input from public static void main
both works fine.

But as I want to declare one function for it and like to call it in main body.

I am not being able to do that.

If any one of the learned members can kindly suggest it.

Regards,
Subhabrata. 

Back to comp.lang.java.programmer | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Input from Console subhabangalore@gmail.com - 2013-02-28 06:28 -0800
  Re: Input from Console Arne Vajhøj <arne@vajhoej.dk> - 2013-02-28 09:34 -0500
    Re: Input from Console subhabangalore@gmail.com - 2013-02-28 06:47 -0800
      Re: Input from Console FredK <fred.l.kleinschmidt@gmail.com> - 2013-02-28 07:32 -0800
      Re: Input from Console markspace <markspace@nospam.nospam> - 2013-02-28 08:42 -0800
  Re: Input from Console Roedy Green <see_website@mindprod.com.invalid> - 2013-02-28 07:44 -0800
    Re: Input from Console subhabangalore@gmail.com - 2013-02-28 08:21 -0800
    Re: Input from Console Arne Vajhøj <arne@vajhoej.dk> - 2013-02-28 16:55 -0500

csiph-web