<< Prev Question Next Question >>

Question 119/183

Given:

The class is poorly encapsulated.
You need to change the circle class to compute and return the area instead.
Which three modifications are necessary to ensure that the class is being properly encapsulated?
(Choose 3)

LEAVE A REPLY

Your email address will not be published. Required fields are marked *

Question List (183q)
Question 1: Given: public class MyClass { public static void main(String...
Question 2: Given: (Exhibit) Which two code fragments can be inserted at...
Question 3: Given: What is the result? (Exhibit)...
Question 4: Given the code fragment: (Exhibit) Which code fragment, when...
Question 5: Given: (Exhibit) What is the result?...
Question 6: Given the classes: * AssertionError * ArithmeticException * ...
Question 7: Which three statements describe the object-oriented features...
Question 8: Given the code fragment: (Exhibit) What is the result?...
Question 9: Given: (Exhibit) What is the result?...
Question 10: Given: (Exhibit) What is the result?...
Question 11: Given: public class Equal { public static void main(String[]...
Question 12: Which two are benefits of polymorphism?...
Question 13: Given the code fragment: (Exhibit) What is the result?...
Question 14: Given: (Exhibit) And given the code fragment: (Exhibit) Whic...
Question 15: Given: (Exhibit) What is the result?...
Question 16: Given: (Exhibit) What is the result?...
Question 17: Give: (Exhibit) What is the result?...
Question 18: Which three statements are true about the structure of a Jav...
Question 19: Given: package p1; public class Test { static double dvalue;...
Question 20: Given: class Overloading { int x(double d) { System.out.prin...
Question 21: Given: (Exhibit) What is the result?...
Question 22: Given: (Exhibit) What is the result?...
Question 23: Given the fragments: (Exhibit) Which line causes a compilati...
Question 24: Given: (Exhibit) What is the result?...
Question 25: Given: (Exhibit) and the code fragment: (Exhibit) What is th...
Question 26: Given: (Exhibit) What is the result?...
Question 27: Given the code fragment: (Exhibit) What is the result?...
Question 28: Given the code fragment: (Exhibit) What is the result?...
Question 29: Given: public class Test { public static void main(String[] ...
Question 30: Given the code fragment: (Exhibit) What is the result?...
Question 31: Given the code fragment: (Exhibit) What is the result?...
Question 32: Given the code fragment: (Exhibit) Which modification enable...
Question 33: Which code fragment cause a compilation error? float flt = 1...
Question 34: Given the code fragment: 1. ArrayList&lt;Integer&gt; list = ...
Question 35: Given the code fragment: (Exhibit) Which two modifications, ...
Question 36: Given: (Exhibit) Which two code fragments are valid? (Exhibi...
Question 37: Given: (Exhibit) What is the result?...
Question 38: Given the code fragment: (Exhibit) Which two modifications e...
Question 39: Which two class definitions fail to compile?...
Question 40: Examine: (Exhibit) Which statement is true?...
Question 41: Given the code fragment: int b = 3; if ( !(b &gt; 3)) { Syst...
Question 42: Given: (Exhibit) What is the result?...
Question 43: Given: (Exhibit) What is the result?...
Question 44: Given: (Exhibit) Which code fragment can replace the if bloc...
Question 45: Given: (Exhibit) What is the result?...
Question 46: Given: (Exhibit) What is the result?...
Question 47: Given the code fragment: (Exhibit) What is the result?...
Question 48: What is the proper way to defined a method that take two int...
Question 49: Given: (Exhibit) What is the result?...
Question 50: Given: public class Natural { private int i; void disp() { w...
Question 51: Given the code fragments: (Exhibit) And, (Exhibit) Which sta...
Question 52: Which usage represents a valid way of compiling java source ...
Question 53: Given: public class CheckIt { public static void main (Strin...
Question 54: Given: class Mid { public int findMid(int n1, int n2) { retu...
Question 55: Given the code fragment: (Exhibit) What is the result?...
Question 56: Given the following array: (Exhibit) Which two code fragment...
Question 57: Consider: Integer number = Integer.valueOff 808.1"); Which i...
Question 58: Given the code fragment: (Exhibit) What is the result?...
Question 59: Given the code fragment: String h1 = "Bob"; String h2 = new ...
Question 60: Given: (Exhibit) What is the result?...
Question 61: Given the code fragment: (Exhibit) What is the result?...
Question 62: Given: public class ColorTest { public static void main(Stri...
Question 63: Given this code for the classes MyException and Test: (Exhib...
Question 64: Given: (Exhibit) What is the result?...
Question 65: Given: (Exhibit) And given the code fragment: (Exhibit) What...
Question 66: Given: (Exhibit) What is the result?...
Question 67: Given the following class: (Exhibit) And given the following...
Question 68: Given: class X { static void m (int[] i) { i[0] += 7; } publ...
Question 69: Given: public class Test { static boolean bVar; public stati...
Question 70: Given the code fragment: (Exhibit) What is the result?...
Question 71: Given: (Exhibit) and the code fragment: (Exhibit) What is th...
Question 72: Given: (Exhibit) What is the result?...
Question 73: Given: public class MyClass { public static void main(String...
Question 74: Given: (Exhibit) What is the result?...
Question 75: Given the code fragment: (Exhibit) What is the result?...
Question 76: Given the code fragments: (Exhibit) Which modification enabl...
Question 77: Given: 1. public class Simple { 2. public float price; 3. pu...
Question 78: Given the code fragment: String[] cartoons = {"tom","jerry",...
Question 79: Given: (Exhibit) And the code fragment: (Exhibit) What is th...
Question 80: Given: (Exhibit) What is the result?...
Question 81: Which two statements are true about Java byte code? (Choose ...
Question 82: Which statement will empty the contents of a StringBuilder v...
Question 83: Which statement is/are true? I. Default constructor only con...
Question 84: Given: (Exhibit) What is the result?...
Question 85: Given the code fragment: (Exhibit) Test.java: (Exhibit) Whic...
Question 86: Given: (Exhibit) What is the result?...
Question 87: Given: (Exhibit) How many objects have been created when the...
Question 88: Given: (Exhibit) How many MarkList instances are created in ...
Question 89: Which three statements are true about the structure of a Jav...
Question 90: Given the code fragment? public class Test { public static v...
Question 91: Given the code fragment: (Exhibit) You want the code to prin...
Question 92: Given: (Exhibit)
Question 93: Given the code fragment: (Exhibit) What is the result?...
Question 94: Given: public class String1 { public static void main(String...
Question 95: Given: (Exhibit) What is the result?...
Question 96: Given the code fragment: (Exhibit) Which two modifications s...
Question 97: Given the code fragment: (Exhibit) Which three code fragment...
Question 98: Given: (Exhibit) What is the result?...
Question 99: Given the code fragment: (Exhibit) What is the result?...
Question 100: Given the code fragment int var1 = -5; int var2 = var1--; in...
Question 101: Given: (Exhibit) What is the result?...
Question 102: Given the code fragment: (Exhibit) Test.java (Exhibit) Which...
Question 103: Given the code fragment: (Exhibit) Which two modifications s...
Question 104: Given the code fragment: (Exhibit) What is the result?...
Question 105: Given the definitions of the MyString class and the Test cla...
Question 106: Which three statements are benefits of encapsulation?...
Question 107: Which two are Java Exception classes?...
Question 108: Given the code fragment: (Exhibit) What is the result?...
Question 109: Which statement is true about Java byte code?...
Question 110: Given the code fragment: int[] array = {I, 2, 3, 4, 5}; And ...
Question 111: Given: public class Test { } From which class does the Java ...
Question 112: Given: public class Painting { private String type; public S...
Question 113: Given the code fragment: (Exhibit) What is the result?...
Question 114: Given the following classes: (Exhibit) Which two options fai...
Question 115: Given the class definitrions: class Shape { } class Square e...
Question 116: Given the code fragment: (Exhibit) Which two modifications, ...
Question 117: Which of the following can fill in the blank in this code to...
Question 118: Given the code fragment: (Exhibit) What is the result?...
Question 119: Given: (Exhibit) The class is poorly encapsulated. You need ...
Question 120: Given: (Exhibit) What is the result?...
Question 121: Given: (Exhibit) What is the result?...
Question 122: Given the following main method: (Exhibit) What is the resul...
Question 123: Given: (Exhibit) What is the result?...
Question 124: Given the code fragment: (Exhibit) Which code fragment print...
Question 125: Given the code fragment: (Exhibit) Assume that the system da...
Question 126: Which two statements correctly describe checked exception?...
Question 127: Given: (Exhibit) What is the result? (Exhibit)...
Question 128: Given the code fragments: (Exhibit) And: (Exhibit) Which sta...
Question 129: Given: (Exhibit) Which is true?...
Question 130: Given the code fragment: (Exhibit) What is the result?...
Question 131: The following grid shows the state of a 2D array: (Exhibit) ...
Question 132: You are asked to create a method that accepts an array of in...
Question 133: Given the code fragment: (Exhibit) What is the result?...
Question 134: You are developing a banking module. You have developed a cl...
Question 135: Given the code fragment: // insert code here arr[0] = new in...
Question 136: Given a java source file: (Exhibit) What changes will make t...
Question 137: Given: (Exhibit) What is the result? (Exhibit)...
Question 138: Given the code fragment: float x = 22.00f % 3.00f; int y = 2...
Question 139: Which three statements are true about the structure of a Jav...
Question 140: Given the code fragment: (Exhibit) What is the result?...
Question 141: Given: public class TestLoop { public static void main(Strin...
Question 142: Given the code fragment: (Exhibit) Which modification enable...
Question 143: Given: (Exhibit) What is the result?...
Question 144: Given the code fragment: (Exhibit) Which three code fragment...
Question 145: Given: public class ComputeSum { public int x; public int y;...
Question 146: Given the code fragment: (Exhibit) What is the result?...
Question 147: Which is true about the switch statement?...
Question 148: Given the code fragment: (Exhibit) What is the result?...
Question 149: What is the name of the Java concept that uses access modifi...
Question 150: Given the code fragment: (Exhibit) What is the result?...
Question 151: Given: (Exhibit) And the commands: Javac Test.java Java Test...
Question 152: Given the code fragment: (Exhibit) What is the result?...
Question 153: Given the code fragment: (Exhibit) What is the result? (Exhi...
Question 154: A method is declared to take three arguments. A program call...
Question 155: Given the code fragment: (Exhibit) Which action enables it t...
Question 156: Given: (Exhibit) What is the result?...
Question 157: Given the following class: (Exhibit) Which two changes would...
Question 158: Given the code fragment: (Exhibit) What is the result?...
Question 159: Given: (Exhibit) What is the result?...
Question 160: Given the class definitions: (Exhibit) And the code fragment...
Question 161: Which code fragment is illegal? (Exhibit)...
Question 162: Given the code fragments: 9. class Student { 10. int rollnum...
Question 163: Given: (Exhibit) What is the result?...
Question 164: Given: (Exhibit) What is the result?...
Question 165: Given: (Exhibit) What three modifications, made independentl...
Question 166: Given these classes: (Exhibit) and this mainmethod: (Exhibit...
Question 167: Given the following two classes: (Exhibit) How should you wr...
Question 168: Given: (Exhibit) What is the result?...
Question 169: Given the code fragment: (Exhibit) What is the result?...
Question 170: Which of the following exception will be thrown due to the s...
Question 171: Given the code fragment: (Exhibit) Which code fragment, when...
Question 172: Which two features can be implemented in a Java application ...
Question 173: Given the following code for the classes MyException and Tes...
Question 174: Given: (Exhibit) What is the result?...
Question 175: Given: (Exhibit) What is the result? (Exhibit)...
Question 176: Given the code in a file Traveler.java: (Exhibit) And the co...
Question 177: Which two array initialization statements are valid? (Choose...
Question 178: Given the following code: (Exhibit) What is the output?...
Question 179: Which two items can legally be contained within a java class...
Question 180: Given: (Exhibit) What is the result?...
Question 181: Given: (Exhibit) What is the result?...
Question 182: Given the code snippet from a compiled Java source file: (Ex...
Question 183: Which statement is true about the main() method?...