8 kyu

Classic Hello World

4,768 of 19,703Javatlacati

Description:

You are given a method called main, make it print the line Hello World!, (yes, that includes a new line character at the end) and don't return anything

Note that for some languages, the function main is the entry point of the program.

Here's how it will be tested:

    java Solution.class parameter1 parameter2
    Solution.main("parameter1","parameter2");
    Solution.main "parameter1", "parameter2","parametern"
    Solution.main("parameter1", "parameter2","parametern")
    Solution.main("parameter1", "parameter2","parametern")
   Solution.Main("parameter1", "parameter2","parametern")
   Solution::main("parameter1", "parameter2", "parametern")
   no extra lines there
   greet:greet
    Solution.main("parameter1", "parameter2", "parametern");

Hints:

  1. Check your references
  2. Think about the scope of your method
  3. If you still don't get it probably you can define main as an attribute of the Solution class that accepts a single argument, and that only prints "Hello World!" without any return.
Fundamentals
Object-oriented Programming

Stats:

CreatedApr 5, 2016
PublishedApr 5, 2016
Warriors Trained41463
Total Skips1872
Total Code Submissions65641
Total Times Completed19703
Java Completions4768
Ruby Completions646
CoffeeScript Completions26
JavaScript Completions4666
Python Completions5695
C# Completions1478
PHP Completions1100
Shell Completions2147
Prolog Completions43
Groovy Completions17
Total Stars244
% of votes with a positive feedback rating65% of 2293
Total "Very Satisfied" Votes1222
Total "Somewhat Satisfied" Votes534
Total "Not Satisfied" Votes537
Ad
Contributors
  • Javatlacati Avatar
  • jhoffner Avatar
  • GiacomoSorbi Avatar
  • donaldsebleung Avatar
  • Chrono79 Avatar
  • asedov Avatar
  • B1ts Avatar
  • FArekkusu Avatar
  • hobovsky Avatar
  • user3029010 Avatar
  • Kacarott Avatar
  • FranzMartyn Avatar
  • saudiGuy Avatar
Ad