Home / MCQ Bank / Computer
Computer Constructors And Methods Difficulty: Medium

What is a constructor in Java?

Select the correct option to test your answer:

More Computer Questions

Arrange the operators in the increasing order as defined in C#. !=, ?:, &, ++, && What will be the output of the following C++ code? #include <iostream> #include <string> using namespace std; class Box { int capacity; public: Box(int cap){ capacity = cap; } friend void show(); }; void Box::show() { Box b(10); cout<<"Value of capacity is: "<<b.capacity<<endl; } int main(int argc, char const *argv[]) { show(); return 0; } What is the purpose of the 'default' case in a 'switch' statement in C#? A form of modulation In which the amplitude of a carrier wave is varied in accordance with some characteristic of the modulating signal, is known as What is the purpose of using blocks and procs in Ruby?