This is my code. Please tell me what I'm doing wrong.

public class Solution
    public static void main(String[] args)
        String s = "Many people are alive only because it’s illegal to shoot them.";

asked 05 Jun '15, 11:25

Osama%20Arshad's gravatar image

Osama Arshad
accept rate: 0%

Hey, You're missing a newline, try this:

String s="Many people are alive only because it's illegal\nto shoot them.";

\n is a new line character


answered 14 Jul '17, 15:58

NEuROnek's gravatar image

accept rate: 0%

edited 14 Jul '17, 16:00

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 05 Jun '15, 11:25

Seen: 1,086 times

Last updated: 14 Jul '17, 16:00