Originally posted by Valentin Crettaz:
[b]1) What are octal and hexadecimal numbers
This is another way of representing values. Both are derived from the binary representation of the decimal form.
For instance,
decimal : 157
binary : 10011101 (1*128+0*64+0*32+1*16+1*8+1*4+0*2+1*1)
To get the octal representation you have to group the bits by 3.
octal : 010 011 101 => 235 in octal, represented by 0235 (notice the 0 at the beginning of the number
To get the hexadecimal representation you have to group the bits by 4
hex : 1001 1101 => 9D in hex, represented by 0x9D (notice the 0x at the beginning of the number)
2) What is any number raised to 0 equal to ie 8 raised to 0
Math.pow(x,0) = 1.0 only if x!=0 in which case the result should be undefined although the JVM returns 1.0 for that onesee Algebra Help).
3) How to convert a decimal into its octal and hexadecimal
see 1.
4) What is the range of int
JLS 4.2.1
from -2147483648 to 2147483647, inclusive
5) what is the range of float
JLS 4.2.3
6) Why do methods have to be abstract
Because sometimes you want the subclasses to implement the behavior of the method. Abstracting a method forces the developer to implement it in order to make a subclass of an abstract class intantiatable.
HIH
[/B]
Originally posted by Bosun Bello:
It's a good thing that you've actually understood the concept. As for an exact definition, if you look at 5 different texts their definitions of these concepts will differ somewhat. But the concept still stays the same.
Bosun