In java, ............. can only test for equality, where as ............ can evaluate any type of the Boolean  expression.
A) switch, if
B) if, switch
C) if, break
D) continue, if

1 Answer

Answer :

A) switch, if

Related questions

Description : In java, string is a ............. A) primitive data type B) abstract data type C) combination of boolean D) None of the above

Last Answer : B) abstract data type

Description : By using ................... you can force immediate termination of a loop, by passing the conditional expression and any remaining code in the body of the loop. A) Break B) Continue C) Terminate D) Loop Close

Last Answer : A) Break

Description : Consider the following statements : (a) Boolean expressions and logic networks correspond to labelled acyclic digraphs. (b) Optimal Boolean expressions may not correspond to simplest networks. (c) Choosing essential blocks first in a Karnaugh map ... (b) only (C) (a) and (b) (D) (a), (b) and (c)

Last Answer : (D) (a), (b) and (c) 

Description : Which of the following control expressions are valid for an if statement? A) An integer expression B) A Boolean expression C) Either A or B D) Neither A nor B

Last Answer : B) A Boolean expression

Description : Which of the following control expressions are valid for an if statement? A) An integer expression B) A Boolean expression C) Either A or B D) Neither A nor B

Last Answer : B) A Boolean expression

Description : Which of the following control expressions are valid for an if statement? A) an integer expression B) a Boolean expression C) either A or B D) Neither A nor B

Last Answer : B) a Boolean expression

Description : A Boolean operator Ө is defined as follows: 1Ө1=1, 1Ө0=0, 0Ө1=0 and 0Ө0=1 What will be the truth value of the expression (xӨy)Өz = xӨ(yӨz)? (A) Always false (B) Always true (C) Sometimes true (D) True when x, y, z are all true

Last Answer : (B) Always true

Description : The dual of a Boolean expression is obtained by interchanging (A) Boolean sums and Boolean products (B) Boolean sums and Boolean products or interchanging 0's and 1's (C) Boolean sums and Boolean products and interchanging 0's & 1's (D) Interchanging 0's and 1's

Last Answer : (C) Boolean sums and Boolean products and interchanging 0's & 1's

Description : The ....................... looks only for a match between the value of the expression and one of its case constants. A) if B) match C) switch D) None of the above

Last Answer : C) switch

Description : What is the difference between break and continue?

Last Answer : A: break keyword stops the complete loop and takes the control out of the loop, whereas, the continue keyword just stops the current iteration and takes the control to the next iteration.

Description : Which of the following do not represent legal flow control statements? A) break; B) return; C) exit(); D) continue outer;

Last Answer : C) exit();

Description : Which of the following do not represent legal flow control statements? A) break; B) return; C) exit(); D) continue outer;

Last Answer : C) exit();

Description : The statement is used to transfer the control to the end of statement block in a loop. a. Continue b. Break c. Switch d. Goto

Last Answer : b. Break

Description : The simplified function in product of sums of Boolean function F(W, X, Y, Z) = Σ(0, 1, 2, 5, 8, 9, 10) is (A) (W' + X') (Y' + Z') (X' + Z) (B) (W' + X') (Y' + Z') (X' + Z') (C) (W' + X') (Y' + Z) (X' + Z) (D) (W' + X') (Y + Z') (X' + Z)

Last Answer : (A) (W' + X') (Y' + Z') (X' + Z)

Description : The simplified form of a Boolean equation (AB’+AB’C+AC)(A’C’+B’) is : (A) AB’ (B) AB’C (C) A’B (D) ABC

Last Answer : (A) AB’

Description : Simplified Boolean equation for the following truth table is: (A) F = yz’ + y’z (B) F = xy’ + x’y (C) F = x’z + xz’ (D) F = x’z + xz’ + xyz 

Last Answer : (C) F = x’z + xz’ 

Description : The Karnaugh map for a Boolean function is given as The simplified Boolean equation for the above Karnaugh Map is (A) AB + CD + AB’ + AD (B) AB + AC + AD + BCD (C) AB + AD + BC + ACD (D) AB + AC + BC + BCD

Last Answer : (B) AB + AC + AD + BCD

Description : What type of gate is represented by the output Boolean expression R T Å ?

Last Answer : Exclusive NOR (X-NOR).

Description : What is the output Boolean expression for an AND gate with A and B as inputs when the B input is inverted?

Last Answer : AB

Description : What is the output Boolean expression for a NOR gate with R and T as inputs?

Last Answer : (R +T)’

Description : What is the output Boolean expression for a NAND gate with inputs A, B, and C?

Last Answer : C B A

Description : Write the Boolean expression for an OR gate having G, K

Last Answer : . f = G+K+L.

Description : What is the Boolean expression for the output of an AND gate that has R and S as inputs?

Last Answer : f = RS.

Description : Karnaugh map is used for the purpose of (A) Reducing the electronic circuits used. (B) To map the given Boolean logic function. (C) To minimize the terms in a Boolean expression. (D) To maximize the terms of a given a Boolean expression.

Last Answer : (C) To minimize the terms in a Boolean expression.

Description : Write simple example of Boolean expression for SOP and POS. 

Last Answer : SOP form:

Description : For the circuit shown in figure, the Boolean expression for the output y in terms of inputs P, Q, R and S is

Last Answer : For the circuit shown in figure, the Boolean expression for the output y in terms of inputs P, Q, R and S is P+Q+R+S

Description : The sum of product expression for a Boolean function can be derived from its truth table by (a) AND operation of the product terms. (b) NOR operation of the product terms. (c) OR operation of the product terms. (d) NAND operation of the product terms.

Last Answer : C. OR operation of the product terms

Description : Why did you write java.util package? (only if you use classes like Scanner or StringTokenizer)

Last Answer : A: To include the functions of the Scanner or StringTokenizer class from the java.util package.

Description : Java Servlet i) is key component of server side java development ii) is a small pluggable extension to a server that enhances functionality iii) runs only in Windows Operating System iv) allows developers to customize any java ... & iv are true C) ii, iii & iv are true D) i, ii & iv are true

Last Answer : D) i, ii & iv are true

Description : State true or false. i) Unix, support multiple user process but only support one thread per process. ii) A java run time environment is an example of a system of one process with multiple threads. A) True, False B) True, True C) False, True D) False, False

Last Answer : B) True, True

Description : Javascript and Java has similar name because ........... is/are true. (a) Javascripts syntax is loosely based on Java's syntax (b) Javascript is stripped down version of Java (c) Java and Javascript are originated from Island of Java ... only (B) (a), (b) and (c) (C) (a) and (b) (D) (a) and (c)

Last Answer : Answer: A

Description : Which of the following statement(s) with regard to an abstract class in JAVA is/are TRUE? I. An abstract class is one that is not used to create objects. II. An abstract class is designed only to act as a base class ... by other classes. (1) Only l (2) Only II (3) Neither I nor II (4) Both l and II

Last Answer : Both l and II

Description : In the second type the information written in java after // is ignored by the ....................... A) Interpreter B) Compiler C) Programmer D) All of the above

Last Answer : B) Compiler

Description : The third type of comment is used by a tool called .................. for automatic generation of documentation. A) Java commenting B) Java generator C) Java doc D) Java loc

Last Answer : C) Java doc

Description : Which of the following is not the java primitive type A) Byte B) Float C) Character D) Long double

Last Answer : D) Long double

Description : If all three ground-detection lamps continue to burn at equal intensity after the test button is depressed and released, which of the listed conditions is indicated? A. No grounds exist B. All three phases are grounded C. The test switch is faulty D. The current transformers are shorted out

Last Answer : Answer: A

Description : What is the default java package?

Last Answer : A: java.lang

Description : Name the primitive data-types in java.

Last Answer : A: byte, short, int, long, float, double, char and boolean

Description : Mention other ways in which java handles exceptions.

Last Answer : A: Java can handle exception using the try-catch block, throws keyword and throw keyword.

Description : What is significance of import java.io.* in your program?

Last Answer : A: The line imports all the classes of the java.io package into the current program.

Description : What is Inheritance? How is it implemented in Java?

Last Answer : A: The ability of a class to adopt/share the properties (data and functions) completely or partially from another class is called Inheritance. In Java, it is implemented by the use of the keyword, extends.

Description : What is Polymorphism? How is it implemented in Java?

Last Answer : A: It literally means the ability to take ‘more than one forms’. The ability of a method to behave in more than one form is called polymorphism. In Java, it is implemented by method (function) overloading (compile time polymorphism) and method overriding (runtime polymorphism).

Description : What is Data Abstraction? How is it implemented in Java?

Last Answer : A: Act of representing only essential features without including its background details is called Abstraction. Data Abstraction can also be defined as the process of hiding the implementation details and showing ... Java, it is implemented by the use of interfaces or by making the class abstract.

Description : What is Encapsulation? How is it implemented in Java?

Last Answer : A: Binding up of data and associated functions together into a single unit called (class) is called Encapsulation. In Java, it is implemented by the use of a class.

Description : Is Java an Object Oriented language?

Last Answer : A: Yes.

Description : State true or false. i) comparisons precede logical operations in java ii) assignment operations succeed increment operations iii) arithmetic operations succeed comparisons iv) x precede + A) i-true, ii-true, iii-false, ... false, ii-true, iii-false, iv-false D) i-true, ii-false, iii-false, iv-true

Last Answer : A) i-true, ii-true, iii-false, iv-true

Description : Each method in a java class must have a unique name . A) Not necessary B) True C) False D) None of the above

Last Answer : A) Not necessary

Description : Data input is A) an abstract class defined in java.io B) a class we can use to read primitive data types C) an interface that defines methods to open files. D) an interface that defines methods to read primitive data types.

Last Answer : D) an interface that defines methods to read primitive data types.