Question
Examine the following code:
public class Calc {
public static void main (String args []) {
int total = 0;
for (int i = 0, j = 10; total > 30; ++i, --j) {
System.out.println(" i = " + i + " : j = " + j);



total += (i + j);
}
System.out.println("Total " + total);
}
}


Does this code:

A. Produce a runtime error
B. Produce a compile time error
C. Print out "Total 0"
D. Generate the following as output:
i = 0 : j = 10
i = 1 : j = 9
i = 2 : j = 8
Total 30
Please select the most appropriate answer.




More Software Questions..
What is the inputsplit in map reduce software?

What is software configuration management?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?

What are the minimum system requirements to run Photoshop? Is it possible to run Photoshop over linux?

Which oracle package is used to manage the oracle lock management services?

What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do you avoid Latch Up?

What is marker interface?

What types of partitioning are there for BW?



Search
Can you Answer!!
  • Q What are LRO's( Linked Reporting Objects)?
  • Q Explain how can you debug the Java code?
  • Q What are the New Job Postings from the Company or Organization, Coal India Limited (CIL) ?
  • Q After how many years the accused persons in L.N.Mishra Assassination Case were given imprisonment by Delhi High Court?
  • Q What must I consider regarding the database before the productive migration?
  • Q Which class does begin Java class hierarchy?
  • Q What is systemic anatomy
  • Q How To Install PHP on Windows?
  • Q Should we jump in to Android? What’s the guarantee that’s what I will see on a phone? Will service providers turn off things?
  • Q What are some tips for starting off in photography?
  • Q What is the use of the file status clause in the select statement in vsam?