how to draw a smile in a java with not using inbuilt functions??

+1 vote
asked Jun 18 by saihemanth nukala (170 points)

1 Answer

0 votes
answered Jun 19 by Peter Minarik (7,260 points)

I'll show you how to create a "Hello world" application in Java:

public class Main
{
    public static void main(String[] args)
    {
        System.out.println("Hello world");
    }
}

System.out.println prints a line on the output. If you have multiple of these, you can print text line by line.

Use these to print out something, like this:

  *
   *
*   *
    *
    *
*   *
   *
  *

Tip: this will need eight System.out.println calls.

Post your solution. ;)

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...