
VnV AT : M3(Java) - Day 1
Quiz by neelimap
Feel free to use or edit a copy
includes Teacher and Student dashboards
Measure skillsfrom any curriculum
Measure skills
from any curriculum
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
With a free account, teachers can
- edit the questions
- save a copy for later
- start a class game
- automatically assign follow-up activities based on students’ scores
- assign as homework
- share a link with colleagues
- print as a bubble sheet
5 questions
Show answers
- Q1Java programs are compiled into intermediate byte code. What is the advantage of this ?enables easy garbage collectionenables multi threadingenables portabilityexecuting the byte code is faster than executing the native code30s
- Q2Which of these is NOT valid keyword or reserved word in Java ?Stringvolatilenulldefault30s
- Q3What will be the output of the following code snippet ? public class Looping { public static void main(String[] args) { int j = 5; for (int i = 0; i< j; i++) { if ( i < j-- ) System.out.print( (i*j) + " "); } } }1 4 20 3 20 3 41 2 330s
- Q4A method within a class is only accessible by classes that are defined within the same package as the class of the method. How can this restriction be enforced ?Without any accessibility specifiersDeclare the method with keyword protectedDeclare the method with the keyword publicDeclare the method with keyword private30s
- Q5What will be the output of the following code ? public class Test { public static void main(String[] args) { double d = 100.04; float f = d; System.out.println("Float value "+f); } }compilation error due to lossy conversion from double to float100.0100.0410030s