programming languages Online Quiz - 175
Description: programming languages Online Quiz - 175 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
The keyword __________ is required to declare a class.
class TempClass { int i; public void TempClass(int j) { int i = j; } } public class C { public static void main(String[] args) { TempClass temp = new TempClass(2); } }
Given the declaration Circle x = new Circle(), which of the following statement is most accurate.
Analyze the following code. public class Test { int x; public Test(String t) { System.out.println("Test"); } public static void main(String[] args) { Test test = null; System.out.println(test.x); } }
The default value for data field of a boolean type, numeric type, object type is ___________, respectively.
Analyze the following code: public class Test { public static void main(String[] args) { double radius; final double PI= 3.15169; double area = radius * radius * PI; System.out.println("Area is " + area); } }
Analyze the following code. public class Test { int x; public Test(String t) { System.out.println("Test"); } public static void main(String[] args) { Test test = new Test(); System.out.println(test.x); } }
Variables that are shared by every instances of a class are __________.
You should add the static keyword in the place of ? in Line ________ in the following code:
1 public class Test { 2 private int age; 3 4 public ? int square(int n) { 5 return n * n; 6 } 7 8 public ? int getAge() { 9 } 10}
SAS programming language is a