Simple question about methods.
Consider the following code:
Code :
import java.io.*;
class Daddy {
int methodOne( int a, long b ) throws IOException { … }
float methodTwo( char a, int b ) { … }
}
public class Boy extends Daddy { }
And the methods:
(α) public static void main( String args[] ) { … }
(b) int methodOne( int c, long d) throws ArithmeticException { … }
(c) float methodTwo( char c, int d) { … }
Witch of them belong to Boy class?
1. (α) & (β)
2. (b) & (c)
3. (α) & (c)
4.All of them.
Personaly i believe a) belongs 100% to boy class cause its the main but im not sure about the other two :/ What u think guys?
Re: Simple question about methods.
Where is the main() method defined?
Please edit your post and wrap your code with
[code=java]
<YOUR CODE HERE>
[/code]
to get highlighting and preserve formatting.
Re: Simple question about methods.
the main is in boy class from what i understand this is the code the question it doesnt contain anything else :/
Re: Simple question about methods.
I do not see the main() method. It's not in the posted code.
Re: Simple question about methods.
try to put "main()"method..