Home / MCQ Bank / Computer
Computer Methods In Ruby Difficulty: Medium

What does the attr_reader method do in Ruby?

Select the correct option to test your answer:

More Computer Questions

Consider the string "abbccbba". What is the minimum number of insertions required to make the string a palindrome? What will be the output of the following Java code? class output { public static void main(String args[]) { char c[]={'a', '1', 'b' ,' ' ,'A' , '0'}; for (int i = 0; i < 5; ++i) { if(Character.isDigit(c[i])) System.out.println(c[i]+" is a digit"); if(Character.isWhitespace(c[i])) System.out.println(c[i]+" is a Whitespace character"); if(Character.isUpperCase(c[i])) System.out.println(c[i]+" is an Upper case Letter"); if(Character.isLowerCase(c[i])) System.out.println(c[i]+" is a lower case Letter"); i=i+3; } } } HCatalog is installed with Hive, starting with Hive release is . . . . . . . . Apache Knox provides . . . . . . . . REST API Access Point. What is the result of the following code snippet? class Parent { void display() { System.out.println("Parent"); } } class Child extends Parent { void display() { System.out.println("Child"); } } public class Main { public static void main(String[] args) { Parent obj = new Child(); obj.display(); } }