System.out.println()

We will print one string saying Welcome to plus2net
Here is the code inside my_first.java file.
package my_proj;

public class my_first {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
    System.out.println("Welcome to plus2net");

	}

}
Adding two integers
package my_proj;

public class my_first {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
    System.out.println("Welcome to plus2net");
    int v1=5;
    int v2=7;
    int res=v1+v2;
    System.out.println("Output :" + res);
	}

}

Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com



    Post your comments , suggestion , error , requirements etc here




    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer