Write Java code that uses a while loop to print even numbers from 2 through 10.
What will be an ideal response?
```
int evenNumber = 2;
while(evenNumber <= 10)
{
System.out.println(evenNumber);
evenNumber += 2;
}
```
Computer Science & Information Technology
You might also like to view...
struct nodeType{ int info; nodeType *link;};nodeType *head, *p, *q, *newNode;newNode = new nodeType; Consider the accompanying code. What is the effect of the following statement?newNode->info = 50;
A. Stores 50 in the info field of the newNode B. Creates a new node C. Places the node at location 50 D. Cannot be determined from this code
Computer Science & Information Technology
A(n) ____________________ is an area of memory that holds data from one device while it is waiting to be transferred to another device.
Fill in the blank(s) with the appropriate word(s).
Computer Science & Information Technology