Which of the following statements about threading in Java is true?
Anonymous Quiz
71%
Threading allows a program to perform multiple tasks simultaneously.
11%
Threading ensures that a program runs faster than single-threaded programs.
16%
Threading guarantees the sequential execution of tasks in the order they are created.
3%
Threading is only useful in graphical user interface (GUI) applications.
π5
Can a for loop have multiple break conditions?
Anonymous Quiz
43%
yes
32%
no, only one is allowed
9%
Only if the loop has a default case
16%
Only if the loop is nested inside another loop
π₯2π1
Can you write a program to find all numbers in a string ?
input "1 H211o W0r1d" output [1,211, 0, 1] ?
input "1 H211o W0r1d" output [1,211, 0, 1] ?
Anonymous Poll
66%
yes
21%
no
13%
please share video
Forwarded from TechShiksha by Badkul Technology (spring boot and microservices admin)
Newly Joined Members subscribe to our channel to learn programming and crack written exams.
Like this post if you have already subscribed to our channel
Click on below link to subscribe
https://bit.ly/3NLjOpW
Discuss doubts in @javaforfree
Like this post if you have already subscribed to our channel
Click on below link to subscribe
https://bit.ly/3NLjOpW
Discuss doubts in @javaforfree
What is the purpose of the break keyword in a for loop?
Anonymous Quiz
69%
It terminates the loop immediately
14%
It skips the current iteration
14%
It moves to the next iteration
4%
It is optional and not required
π6π1
Forwarded from TechShiksha by Badkul Technology (spring boot and microservices admin)
Which of the following statements about Java interfaces is true?
Anonymous Quiz
15%
An interface can be instantiated using the new keyword.
19%
An interface can contain instance variables.
26%
An interface can have method implementations.
40%
An interface can extend multiple other interfaces.
Which of the following statements is true about checked and unchecked exceptions in Java?
Anonymous Quiz
68%
Checked exceptions are checked at compile-time, while unchecked exceptions are checked at runtime.
14%
Checked exceptions are checked at runtime, while unchecked exceptions are checked at compile-time.
11%
Checked exceptions and unchecked exceptions are both checked at compile-time.
7%
Checked exceptions and unchecked exceptions are both checked at runtime.
π5
Which of the following is a new feature introduced in Java 17?
Anonymous Quiz
24%
records
20%
switch expression
38%
lambda expression
19%
Generics
π7
What is the purpose of a while loop?
Anonymous Quiz
30%
To iterate over a collection of elements
7%
To declare variables in a program
58%
To execute a block of code multiple times
5%
To handle exceptions in a program
π7
In a while loop, when is the loop condition checked?
Anonymous Quiz
39%
Before each iteration
23%
After each iteration
31%
Before the loop starts
8%
After the loop ends
π3π2
Which of the following statements correctly creates a two-dimensional array with 3 rows and 4 columns?
Anonymous Quiz
68%
int[][] matrix = new int[3][4];
9%
int[3, 4] matrix = new int[][];
13%
int[3][4] matrix = new int[];
10%
int[][] matrix = new int[]{3, 4};
π7
Learn Constructors in java, along with interview questions
https://www.linkedin.com/posts/frb-java_interview-questions-on-constructors-in-java-activity-7082201837520494592-_cvx?utm_source=share&utm_medium=member_desktop
https://www.linkedin.com/posts/frb-java_interview-questions-on-constructors-in-java-activity-7082201837520494592-_cvx?utm_source=share&utm_medium=member_desktop
Linkedin
FRB Java on LinkedIn: Interview Questions on Constructors in Java
Interview Questions on Constructors in Java
#java #interview
#java #interview
Which of the following statements about constructors in object-oriented programming is true?
Anonymous Quiz
10%
Constructors are used to destroy objects.
11%
Constructors can have a return type.
12%
Constructors are called explicitly by the programmer.
66%
Constructors are automatically invoked when an object is created.
π4π1
Which of the following statements is true about the loop body in a while loop?
Anonymous Quiz
22%
It must always execute at least once
11%
It will always execute
65%
It executes based on the condition
2%
It is optional