Results 1 to 3 of 3

Thread: help needed

  1. #1
    radhi16 is offline Member
    Join Date
    Jan 2011
    Posts
    30
    Rep Power
    0

    Default help needed

    when u enter a variable ,tell whether the variable is of what data type.for example int x then it should print x is of interger data type.

    Not able to understand how to start it.Any help

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,041
    Rep Power
    10

    Default

    What have you tried? Where are you getting hung up?

    Split your problem up into smaller pieces. First worry about getting the user input, and then immediately print it out.

    Separately, worry about converting Strings to other data types. A good place to look is the API of the wrapper classes (Integer, for example).

    When you get those two pieces working individually, then worry about combining them.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,785
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by radhi16 View Post
    when u enter a variable ,tell whether the variable is of what data type.for example int x then it should print x is of interger data type.

    Not able to understand how to start it.Any help
    That's a very vague question: you can't enter variables; a use can enter String values or maybe String representation of (integral) numbers. Care to elaborate?

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Help Needed
    By jyothi_tallapaneni in forum Advanced Java
    Replies: 1
    Last Post: 02-11-2010, 08:07 PM
  2. Help needed
    By harshalsakpal in forum CLDC and MIDP
    Replies: 0
    Last Post: 02-17-2009, 04:53 PM
  3. help needed
    By amarchandar in forum New To Java
    Replies: 3
    Last Post: 02-17-2009, 02:59 PM
  4. Help needed.
    By necro-1000 in forum AWT / Swing
    Replies: 2
    Last Post: 01-12-2008, 12:37 PM
  5. Help Needed
    By pks in forum New To Java
    Replies: 1
    Last Post: 01-09-2008, 01:07 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
  •