Examlex

Solved

What Is Wrong in the Following Code

question 7

Short Answer

What is wrong in the following code?
Test {
main(String[] args) {
Number x = Integer(3);
System.out.println(x.intValue());
System.out.println((Integer)x.compareTo(new Integer(4)));
}
}


Definitions:

Adoption

The legal process of taking another's child into one's family, granting it the same legal rights and status as one's biological child.

Preferred Stock

A class of stock that carries with it the right to receive payment of dividends and/or the distribution of assets on the dissolution of the corporation before other classes of stock receive their payments.

Dividends

Net profits, or surplus, set aside for shareholders.

Dissolution

A change in the relation of partners caused by any partner ceasing to be associated in the carrying on of the business.

Related Questions