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.
Loading...
  • Practice
  • Compete
  • Jobs
  • Leaderboard
  • Hiring developers?
  1. Practice
  2. Java
  3. Introduction
  4. Java Int to String
  5. Discussions

Java Int to String

  • Problem
  • Submissions
  • Leaderboard
  • Discussions
  • Editorial

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

  • RodneyShag 2 years ago+ 2 comments

    I agree, the 3rd solution is probably less efficient because it has to do an unnecessary concatenation (+). I also like solution 1 and 2 better since it's clearer what the code accomplishes.

    HackerRank solutions.

    5|
    ParentPermalink
    • crisagazzola 2 years ago+ 2 comments

      Doesn't String.valueOf() call Integer.toString in it's implementation?

      1|
      ParentPermalink
      • RodneyShag 2 years ago+ 0 comments
        [deleted]
        -1|
        ParentPermalink
      • SANOOPKV 10 months ago+ 0 comments

        public static String valueOf(int i) { return Integer.toString(i); }

        2|
        ParentPermalink
    • ramasani17 1 month ago+ 0 comments

      i want full discussion

      0|
      ParentPermalink
  • Contest Calendar
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy
  • Request a Feature