Year : 2015 output: 1.2. What will be the output if I type Year : 1996 output: 2. Invalid Input 2.1. What will be the output if I type Year : 15-08-2015 output: 2.2. What will be the output if I type Year : twozeroonefive output: Viva-Voce Question(At least 5 fundamental question related to experiments) 1: According to Java Operator precedence, which operator is considered to be with highest precedence? Ans: Postfix operators i.e () [] . is at the highest precedence. 2: Variables used in a switch statement can be used with which datatypes? Ans: Variables used in a switch statement can only be a byte, int, or char. 3: Which Java operator is right associative? Ans: The = operator is right associative. 4: List primitive Java types? Ans: The eight primitive types are byte, char, short, int, long, float, double, and boolean. 5: What is the difference between the >> and >>> operators? Ans: The >> operator carries the sign bit when shifting right. The >>> zero-fills bits that have been shifted out. What are of precedence and associativity and how are they used? 6: Ans: Order of precedence determines the order in which operators are evaluated in expressions.
Year : 2015 output: 1.2. What will be the output if I type Year : 1996 output: 2. Invalid Input 2.1. What will be the output if I type Year : 15-08-2015 output: 2.2. What will be the output if I type Year : twozeroonefive output: Viva-Voce Question(At least 5 fundamental question related to experiments) 1: According to Java Operator precedence, which operator is considered to be with highest precedence? Ans: Postfix operators i.e () [] . is at the highest precedence. 2: Variables used in a switch statement can be used with which datatypes? Ans: Variables used in a switch statement can only be a byte, int, or char. 3: Which Java operator is right associative? Ans: The = operator is right associative. 4: List primitive Java types? Ans: The eight primitive types are byte, char, short, int, long, float, double, and boolean. 5: What is the difference between the >> and >>> operators? Ans: The >> operator carries the sign bit when shifting right. The >>> zero-fills bits that have been shifted out. 6: What are of precedence and associativity and how are they used? Ans: Order of precedence determines the order in which operators are evaluated in expressions.
Java_lab_manual.docx