Sunday 22 March 2020

MAKING DESIGN USING JAVA LANGUAGE

Q-2-Write a java program that displays your name and address on the screen as if it were a letter.    Your output should look something like that below
INPUT :
public class NCM {

public static void main(String[] args) {

System.out.println("+--------------------------------------------------------+");
System.out.println("|                                                                             #### |");
System.out.println("|                                                                             #### |");
System.out.println("|                                                                             #### |");
System.out.println("|                                                                                         |");
System.out.println("|                                                                                         |");
System.out.println("|                                                 Kanha Nayak               |");
System.out.println("|                                                 Plot No.-408,Aiginia  |");
System.out.println("|                                                 Bhubaneswar               |");
System.out.println("|                                                                                         |");
System.out.println("+--------------------------------------------------------+");
}

}

OUTPUT :

+--------------------------------------------------------+

|                                                                             #### |

|                                                                             #### |

|                                                                             #### |
|                                                                                         |
|                                                                                         |
|                                                 Kanha Nayak               |
|                                                 Plot No.-408,Aiginia  |
|                                                 Bhubaneswar               |
|                                                                                         |
+---------------------------------------------------------+

JAVA LANGUAGE FIRST PROGRAM "HELLO WORLD"

Q-1-Write a java program to display following messages
                                      "Hello World"
INPUT :
        //NCM-New Coding Master :You Can Give Anything To The Class Name
public class NCM {

public static void main(String[] args) {
         
System.out.println("Hello World!");
      //It Will Print The Message
}

}
OUTPUT :
Hello World!