We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • HackerRank Home

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Apply
  • Hiring developers?
  1. Prepare
  2. Tutorials
  3. 30 Days of Code
  4. Day 1: Data Types
  5. Discussions

Day 1: Data Types

Problem
Submissions
Leaderboard
Discussions
Editorial
Tutorial

    You are viewing a single comment's thread. Return to all comments →

  • jamiewmcandrew
    3 months ago+ 1 comment

    Java Day 1 challenge:

    I succeeded but had some trouble with the string output, putting a blank '\n' in. Resovled this by using two nextLine()s with the second one reading into my string variable. Is there a better or suggested way or is one nextLine() to eat the '\n' left over from nextDouble() standard?

    0|
    Permalink
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy