MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
In algorithm comment use by ____ brackets.
A
curley
B
secure
C
None of the above
D
both of the above
Explanation: 

Detailed explanation-1: -From what I’ve gathered the round brackets are used to contain the conditions of an if statement, and the curly brackets are used to state the operation which follows that condition. Except for the nested else condition in bold, where the else statement is followed by a round brackets enclosing the print command.

Detailed explanation-2: -In Java, brackets are used for the following purposes: Round brackets () Arguments of methods are placed between round brackets. Furthermore, round brackets are used in mathematical formulas to specify priorities of operations, and in control structures such as for-loops and if-clauses.

Detailed explanation-3: -Angle Bracket in Java is used to define Generics. It means that the angle bracket takes a generic type, say T, in the definition and any class as a parameter during the calling. The idea is to allow type (Integer, String, … etc and user-defined types) to be a parameter to methods, classes, and interfaces.

There is 1 question to complete.