Could someone please explain to me the code below? I'm sorry, I know it is a very basic level but I'm not sure I get it.
PACKAGE NAME
package com.futujava.lesson2;
import java.io.IOExeption;
/**
* User: General
* Date: 12/21/12
* Time: 11:59
*/
CLASS NAME
public class Task1
{
⎤
private static String TEXT = "Kiss my metal rear actuator";⎥ CLASS VARIABLE
⎦
⎤
public static void main(String[] args) throws IOExeption ⎥
{ ⎥
SCREEN OUTPUT SINGLE-LINE COMMENT ⎥
System.out.println(TEXT); //Display a single string ⎥
MULTILINE COMMENT ⎥
/* ⎥
This is a multiline comment. ⎥
The code below will display three identical strings. ⎥ main() METHOD
*/ ⎥
VARIABLE DECLARATION ⎥
String s = "Ho-ho-ho!"; ⎥
METHOD CALL ⎥
printTextMoreTimes(s, 3); ⎥
} ⎥
⎦
METHOD PARAMETERS ⎤
public static void printTextMoreTimes(String s, int count) ⎥ METHOD SIGNATURE
⎦
⎤
{ ⎥
LOOP ⎥
for (int i = 0; i < count; i++) ⎥
LOOP BODY ⎥ METHOD BODY/CODE
{ ⎥
System.out.println(s); ⎥
} ⎥
} ⎥
⎦
}
1) what do we import in the beginning?
2) what does throws IOExeption mean?
3) Should VARIABLE DECLARATION ⎥ String s = "Ho-ho-ho!"; ⎥ METHOD CALL ⎥ printTextMoreTimes(s, 3); print it 3 times?
When I try to use this Method Call in IntelliJ IDEA it does not understand it.
4) What is the method signature? Why do we add that later on in the code?
5) Finally, what does the LOOP part mean?