Trending ▼   ResFinder  

ICSE 2010 solved : Computer Applications

34 pages, 9 questions, 0 questions with responses, 0 total responses,    0    0
Manasa Preethi
Sikkim manipal university, Bangalore
Master of Science Information Technology
+Fave Message
 Home > manumansi >

Formatting page ...

ICSE 2010 Q1. (a) Define the term byte code. [2 marks] A1. (a) Byte code is the code that can execute on a Java Virtual Machine (JVM). Byte code is the code created when a Java program is compiled. It can be executed on any machine that contains the Java Runtime Environment (JRE). Q1. (b) What do you mean by type conversion? How is implicit conversion different from explicit conversion? [2 marks] A1. (b) Type conversion means the conversion from one data type to another. For example, an int value being converted to a long value. Implicit type conversion happens when the value being converted (source) has a data type that is smaller than the destination data type. For example, any int value can be converted into a long value there will be no loss of precision. This is because a long is 8 bytes and in int 4 bytes. This does not require an explicit type cast. Explicit type conversion is the opposite for example a long being converted into an int. Here, if the long value is more than what is supported by an int, the rest of the bits get knocked off, and an unpredictable int may result. There could be a loss of precision. The compiler will not allow this to happen, unless we explicitly tell the compiler that we are OK with this conversion, we understand the impact, please allow it to happen . For this, we need to use a type cast. For example, int long x = 12345; we can have int y = (int)x; where the (int) type cast is explicitly needed. Q1. (c) Name two jump statements and their use. [2 marks] A1. (c) Two jump statements are break and continue. The break statement is used to stop execution of a loop body and get out of the loop. The continue statement is used to stop execution of the current iteration of the loop body , and move to the end of the loop, to check for the next iteration; it just skips the balance execution of the current loop body iteration.

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

 

© 2010 - 2024 ResPaper. Terms of ServiceContact Us Advertise with us

 

manumansi chat