Wednesday, September 3, 2014

methods();

  • Declaring
public static void printWarning() {
System.out.println("This product causes cancer");
System.out.println("in lab rats and humans.");
}
  • Calling
public static void main(Strings[] args) {
printWarning();
}
  • Output
 This product causes cancer
in lab rats and humans.

No comments:

Post a Comment