Results 1 to 9 of 9
  1. #1
    MarkSquall's Avatar
    MarkSquall is offline Member
    Join Date
    Jul 2008
    Posts
    5
    Rep Power
    0

    Question Is there any other class for input in command prompt? Please help.

    Dear java-forums.org administrators and members,

    Hello, a pleasant day to everyone. I hope everyone is doing great upon reading this thread of mine. Well, I'm just wondering if Java programming language had provided another class that can be used for input in the command-line (DOS prompt). I had already tried the BufferedReader class and the Scanner class. In case there is, can anyone please give me some link/s where I could read them, or, maybe perhaps, if it's not too much too ask, a simple program will be much appreciated.


    Thank you and more power. God bless everyone.:)


    Warm regards,

    MarkSquall

  2. #2
    RamyaSivakanth's Avatar
    RamyaSivakanth is offline Senior Member
    Join Date
    Apr 2009
    Location
    Chennai
    Posts
    835
    Rep Power
    6

    Default

    Hi,
    I don't think anyother classes are there other than Scanner and BufferedReader.But,you can use command line arguments right:D

    -Regards
    Ramya
    Ramya:cool:

  3. #3
    MarkSquall's Avatar
    MarkSquall is offline Member
    Join Date
    Jul 2008
    Posts
    5
    Rep Power
    0

    Talking Thanks Mr. Ramya.

    Dear Mr. Ramya,

    A greeting of peace.


    Yes, I forgot to mention the command-line input too... :D


    So I guess, only BufferedReader and Scanner (and of course, the command-line input) are the only ones available? Well, just wonder if there's is something else, hehehe. Thanks bro.


    Warm regards,

    MarkSquall

  4. #4
    hardwired's Avatar
    hardwired is offline Senior Member
    Join Date
    Jul 2007
    Posts
    1,576
    Rep Power
    9

    Default

    Check out the Console class (j2se1.6).

  5. #5
    RamyaSivakanth's Avatar
    RamyaSivakanth is offline Senior Member
    Join Date
    Apr 2009
    Location
    Chennai
    Posts
    835
    Rep Power
    6

    Default

    I agree with hardwired.But,some disadvantages are there when using this class in IDE.

    Gothru this article.I think its is very very worthy.

    Stupid Java Tricks » Using the New java.io.Console Class
    Ramya:cool:

  6. #6
    Join Date
    Nov 2007
    Posts
    1
    Rep Power
    0

    Default

    check out the console class in which u will get a method readLine(), that can solve ur purpose..

  7. #7
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  8. #8
    MarkSquall's Avatar
    MarkSquall is offline Member
    Join Date
    Jul 2008
    Posts
    5
    Rep Power
    0

    Thumbs up Thanks everyone.

    Dear hardwired, kartikeysrivastava, Eranga and RamyaSivakanth,


    A greeting of peace.

    Wow...Java is truly an everchanging programming language, I never heard of the Console class in JDK1.6. Now I knew (thanks to you guys), I have another Java class to study with and to be familiarized at.


    Thanks everyone and more power.:)


    Warm regards,

    MarkSquall

  9. #9
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Actually if you want to learn in right way about Java, my suggestion is the Suns' Java Tutorial. In my signature you can easily find the link to it. Good luck! :)

Similar Threads

  1. Creating a Jar File Using Command Prompt
    By hitmen in forum New To Java
    Replies: 14
    Last Post: 08-27-2011, 12:05 PM
  2. how to get the values from command prompt
    By tej in forum New To Java
    Replies: 3
    Last Post: 05-02-2009, 08:32 AM
  3. help me!!!! about command prompt..
    By kureikougaiji in forum New To Java
    Replies: 2
    Last Post: 11-13-2008, 06:15 PM
  4. Regular expressions from command prompt
    By GenkiSudo in forum New To Java
    Replies: 2
    Last Post: 09-21-2008, 02:40 PM
  5. Problem during executing Command Prompt
    By keshari in forum Advanced Java
    Replies: 4
    Last Post: 06-05-2008, 04:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •