Select the correct option to test your answer:
Computer
Constructors And Methods
Difficulty: Medium
What will be the output of the following Java program? 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; System.out.println(obj.isequal()); } }
More Computer Questions
How many bits are in a single IP address?
In the email dialogue box Bcc is used for writing the__________?
Which search mode uses natural language search as a subroutine?
Which of the following property defines in a shorthand form the width, style, and color for the bottom border of an element?
What will be the output of the following C++ code? #include <iostream> #include <vector> #include<iterator> using namespace std; int main () { vector<int> myvector; for (int i = 1; i <= 10; i++) myvector.push_back(i); myvector.erase (myvector.begin() + 6); myvector.erase (myvector.begin(), myvector.begin() + 4); for (unsigned i = 0; i < myvector.size(); ++i) cout << ' ' << myvector[i]; return 0; }