Examlex

Solved

What Is the Output from the Following Java Program

question 55

Multiple Choice

What is the output from the following Java program?
Public class test03
{
Public static void main(String[] args)
{
For (int i = 0; i < 4; i++)
{
System.out.print(myFun(i) + " ") ;
}
System.out.println() ;
}
Public static int myFun(int perfect)
{
Perfect = 0;
Return ((perfect - 1) * (perfect - 1) ) ;
}
}


Definitions:

Properties

Characteristics or attributes that define the behavior, state, or qualities of a system, substance, or object, in various contexts.

Insulator

A material used to electrically isolate two conductive surfaces.

Valence Electrons

Electrons in the outermost shell of an atom that are significant in chemical bonding and reactions.

Voltage Change

A variation in the electrical potential difference between two points in a circuit, which can cause current to flow if a path is available.

Related Questions