Answer:
public class Triangle
{
public static void main( String[] args )
{
show( 5 );
}
public static void show( int n )
{
int i,j,k;
for (i = 0; i < n - 1; i++ )
{
for (j = 0; j < i; j++ )
{
System.out.print( " " );
}
for (k = n - i; k > 0; k-- )
{
System.out.print( "* " );
}
System.out.println();
}
for (i = 0; i < n; i++ )
{
for (j = n - i; j > 1; j-- )
{
System.out.print( " " );
}
for (k = 0; k < i + 1; k++ )
{
System.out.print( "* " );
}
System.out.println();
}
Answer:
The Variable is out of scope
Explanation:
In programming variables exists with scopes This could be local or global. When a variable is declared as a global variable it is available to all methods and procedures in the program. Java programming language as well as C++ and several others use the open and close braces to define the scope in programs. consider the following example
<em>public class ANot {</em>
<em> public static void main(String[] args) {</em>
<em> int i = 0;</em>
<em> while ( i<10){</em>
<em> int sum = 0;</em>
<em> sum = sum+i; </em>
<em> }</em>
<em> }</em>
<em>}</em>
In this example, the variable i is global and can be assessed within the while loop but the variable sum is local to the while loop and cannot be assessed outside of it
Answer:
C. &&
Explanation:
Of the options provided:
A) ++ : increment operator. For example : ++1 = 2
B) || : Logical OR operator. A || B is true if any one of A or B is true.
C) && : Logical AND operator. A && B is true if both A and B are true.
A B A && B
False False False
False True False
True False False
True True True
D) @ : Ampersand character (commonly used in email addresses) e.g, [email protected]
very independent : ) we use it for everything
Answer:
The answer is D) Double-Clicking
Explanation:
The question is a Microsoft Office Excel Question.
A sheet is also called a worksheet in Microsoft Office Excel. A sheet is a single page that holds its own collection of cells with which one can organize their data.
Sheets in Microsoft Office Excel spreadsheet can run into hundreds and hundreds and is usually visible a the bottom of the excel page as tabs.
By default, the tabs or sheets are named starting from the first as Sheet 1, Sheet 2, Sheet 3...etc.
By double-clicking on the tab, one is able to change the default name to any custom name the user choses.
Cheers!