What will be the output of the following C# code snippet? [code] class equality { int x; int y; boolean isequal() {

Lượng Tiger

New member
What will be the output of the following C# code snippet?
Code:
class equality 
{
    int x;
    int y;
    boolean isequal()
    {
        return(x == y);  
    } 
}    
class Output 
{
    public static void main(String args[]) 
    {
       equality obj = new equality();
       obj.x = 5;
       obj.y = 5;
       Console.WriteLine(obj.isequal());
    } 
}
A. false
B.
Code:
true
C. 0
D. 1
 

Tìm kiếm

Back
Top