Java Test-5 | Objective Questions | Interview questions | java basic coding

preview_player
Показать описание
Java Test-5 | Objective Questions | Interview questions | java basic coding

Java is one of the most popular and widely used programming languages and platforms. A platform is an environment that helps to develop and run programs written in any programming language. Java is fast, reliable, and secure. From desktop to web applications, scientific supercomputers to gaming consoles, cell phones to the Internet, Java is used in every nook and corner.

Java is one of the most popular programming languages in the world, known for its versatility, portability, and wide range of applications. Java is the most used language in top companies such as Uber, Airbnb, Google, Netflix, Instagram, Spotify, Amazon, and many more because of its features and performance.

In this article, we will provide 200+ Core Java Interview Questions tailored for both freshers and experienced professionals with 3, 5, and 8 years of experience. Here, we cover everything, including core Java concepts, Object-Oriented Programming (OOP), multithreading, exception handling, design patterns, Java Collections, and more, that will surely help you to crack Java interviews.
Simple: Java is quite simple to understand and the syntax
Platform Independent: Java is platform independent means we can run the same program in any software and hardware and will get the same result.
Interpreted: Java is interpreted as well as a compiler-based language.
Robust: features like Garbage collection, exception handling, etc that make the language robust.
Object-Oriented: Java is an object-oriented language that supports the concepts of class, objects, four pillars of OOPS, etc.
Secured: As we can directly share an application with the user without sharing the actual program makes Java a secure language.
High Performance: faster than other traditional interpreted programming languages.
Dynamic: supports dynamic loading of classes and interfaces.
Distributed: feature of Java makes us able to access files by calling the methods from any machine connected.
Multithreaded: deal with multiple tasks at once by defining multiple threads
Architecture Neutral: it is not dependent on the architecture.

👉 java Interview question.
👉 java program solution.
👉 java full course
👉 java full course in hindi
👉 java tutorial for beginner
👉 java programming
👉 learn java
👉 java tutorial
👉 tutorial in hindi
👉 java class in hindi
👉 java for beginners.
👉 learn java.
👉 java by op sir
👉 coding by op sir
👉 op sir
👉 placements
👉 placements course
👉 it placements
👉 job orianted course
👉 crack interview
👉 interview question and solution

java, learn java, java tutorial, java course, java programming, java tutorial for beginners, java for beginners, how to code java, java full course, how to code in java, java basics, java beginner lesson, java 13, learn java code, how to learn java, learn java quick, java gui, gui java, why java, java oop, oop java, learn to code java, learn java coding, learn java easy way, code java, core java, java 2024, java swing, curso java, learn java programming



#java #oops #class #object #array #loop #programming
#c #html #programming #css #coding #java #python #developer #programmer #webdeveloper #webdevelopment #code #coder #php #webdesign #software #softwaredeveloper #computerscience #codinglife #reactjs #technology #frontend #development #programmers #js #web #softwareengineer #programmingmemes #linux #javadeveloper


Some Others Playlists:

C language Full Course Playlist:

C Programs Playlist for Exercise:

DSA Using C Language for Beginners Step by Step in Hindi

Complete Java Course Playlist:

Java Programs Playlist in Hindi:

DSA Using Java (Data Structures and Algorithms) From Scratch for Beginners:

Javascript Full Playlist in Hindi:

Node Js Full Playlist in Hindi:

React Js tutorial for beginners in Hindi:
Рекомендации по теме
Комментарии
Автор

Q.1
answer:-
documentation comment-/** */.
single line comment-//.
multiple line comment-/* */
documentation comment- /** 8/

Q.2
answer:-
hello test, hello test

Q.3
answer:-
public static void main(String[]..a)

Q.4
answer:-


Q.5
answer:-
10, 97, ,

Q.6
answer:-
C=30, line 10

Q.7
answer:-
line 5

Q.8
answer:-
line 8

Q.9
answer:-
line 7

Q.10
answer:-
line 3

Q.11
answer:-
line 2

Q.12
answer:-
line 3

Q.13
answer:-
system.out.println("a")

Q.14
answer:-
system.out.println(c)

Q.15
answer:-
a+b, 70

Q.16
answer:-
a+b, a+b, a+b30, a+b30, a+b3040, a+b3040

Q.17
answer:-
a+b, a+b70, a+b70, a+b, a+b70, a+b70

Q.18
answer:-
_, _, _, _, 30 _, 30

Q.19
byte b3=(byte)i2

Q.20
answer:-
blank

lakhannayma
Автор

Q.1
Ans=A=>2
B=>3
C=>4
D=>1
Q.2
Ans=D.

Q.3
Ans=B.

Q.4


Q.5
Ans=10, 97,

Q.6
Ans=8, 9

Q.7
Ans=7

Q.8
Ans=5.

Q.9
Ans=7, 12.

Q.10
Ans=3

Q.11
Ans=2, 5

Q.12
Ans=2

Q.13
Ans=3, 6

Q.14
Ans=3

Q.15
Ans=2, 3

harshgupta
Автор

Q1 A->2
B->3
C->1
D->4

Q2 A

Q3 B

Q4 30, 30.00f

Q5 4, 2, 254, 37.435, 37.435f, 10l, 2

Q6 7

Q7 3

Q8 5, 6

Q10 123

Q11 2

Q9 2

Q11 1, 2

Q12 5

Q14 1line

Q15 70 a+b

poojachouhan
Автор

By - Shivam Ahirwar

Q1) CABC
Q2) D
Q3) B
Q4) 30,
Q5) b1:10
b2:a
s1:254
d:37.435
f:37.435
l:10L
ch2:256
Q6) 9 line
Q7) 4 line
Q8) 4 line
Q9) 7 line
Q10) 4 line
Q11) 5 line
Q12) 2 line
Q14) 7 line
Q15) 5 line
Q16) 10
error
a
10.0
10.345f
30L
30L
70
Q18) 70
a + b
Q19) a + b0
a + b70
a + b3040
a + b3040
a + b3040
Q20) a + b0
a + b70
a + b70
a + b70
a + b70
a + b70

soljer.
Автор

1> single line comment : //
multiline comment : /* */
documentd lcomment :- /** * /
documents comments :- /**
*
*/.

2 ;- Hello Test1

3 :- nhi bna

4 : - a=30
c= error

5;- b1 = 10
b2 =errror
-1
d= 37.435
f = 37.435
c= 10
ch2 = 0

6:- c= 30
f2 = erroe

7:- 5
6
7

8 :- 3
4
7
8

9 :- 6
7
8
9
10
12

10:- 3
4

11:- 2
5

12:- 2

13 :- nhi bna

14:- 4
6

15 ;- 3
4
5

16: - 10
error
a
10.0
10.345
30
30
70

17:-
70
30 40 70

rohitporwal
Автор

Q1. A=2
B=1
C=4
D=3
Q.2 ->>>B
Q.3->>D
Q.4->>>C=30
F2= ERROR
Q5->>>>B1=10
B2=ERROR
CH= A
D= 37.435
F=37.435

Q.6->>>C=30
F2=ERROR
I2=ERROE
I2=ERROR
I2= 30
I3=ERROR

Q7->>>B3=30
I4=ERROR
B3=30
B3=30
B3=30



11--->>>>
2

12--->>>
3.1400, 3.140000

12--->>>
3, 5

13---->>>>
10
error
a
10.0
10.345f
30L
30L
70

15---->>>>
70
a + b

16---->>>>
0
a + b 30+40
a + b 30+40

a + b 3040
a + b 30+40
a + b 30+40


18---->>>>
30
30
30
30
30
30

19---->>>>
3 inValid
5 inValid
8 inValid
11 inValid
13 inValid
17 inValid
18 inValid

ankitverma
Автор

q 1
1.documentation /** */ c
2. single line // A

3.multiline /* */ b
q 2
q 4 30 30
q 5 10
q 6 9
q 7
q 8
q 9 7
q 10 4
q 11
q12 2
q 14
q 15
q 16
q 17 10
2. a
3. a
4.
5. 10.345000
6.
7.
8. 70

garimasoni
Автор



1.documentation=/** */
2.single line=//
3.multiple line=/* */
4.documentation=/** */



hello test1


3



30




b1=10
b2=a;
s1=254
d=37.435
f=37.435
l=
ch2=-1



->8
->9



->3
->4



->12
->3



->3
->4



->5



314
314


4, 6



10
a
a

10.345
issue
30
70



70
Addition of a and b 70



70
a+b





a+b=0
a+b 70
a+b+70
a+b30 40
a+b3040



a+b=0
a+b 70
a+b 70
a+b 70
a+b70


error

SahbajKhan-vh
Автор

Q.1= A, B
Q.2= Hello Test
Q.3= (b.)=1
Q.4=Error
Q.7=line 3rd
Q.8=line 3rd
Q.11=error
Q.12=line 3rd
Q.14=1]70
2]The addition of 30 and 40 is 70
3]The addition of 10 and 20 is 30
4]The addition of 10 and 20 is 30
5]The addition of 10 and 20 is 30
6]The addition of 10 and 20 is 30
7]The addition of 10 and 20 is 30
8]The addition of 10 and 20 is 30
9]The addition of 10 and 20 is 30
10]The addition of 10 and 20 is 30
Q.15=1]3040
2]a+b
Q.16= 1]a+bab
2]a+b3040
3] a+b3040
4]a+b3040
5]a+b3040
6]a+b3040
Q.17=error
Q.18=1] 30
2]10 20
3]30
4]30
5]30
Q.19= error
Q.20=

bhartigurjar
Автор

Q1=1.D=/** */
2.A//
3.B/* */
4.C/** */
Q2= A
Q4=30
Q=3 C
Q=15
70
a+b

RajnandaniModi
Автор

(1) Document = c
single = a
multi = b
document = d

(2) hello Test, Hello Test2

(3) 4
(4) error
(5) error
(6) 8
(7) error
(8) 5 6
(9) 2
(10) 3
(11) 2
(9) 2
(10) 300

(11) 7
(12) 5
(13) 10
error
a
10.0
10.34f
30l
30l
70
(14) The addition of 10 + and +b + is c
The addition of 10 + and +20 + is 30
The addition of 10 and 20 is 30
The addition of and +20 + is +30
The addition of 10 and 20 + is +30
The addition of 10 and 20 +30
The addition of 10 + and +b + is c
The addition of 10 + and +b + is c
(15) 70
a+b
(16) a+b+a+b
a+b+30+40
a+b30+40
a+b30+40
a+b3040
a+b30+40
(17) a+b+(a+b)
a+b+(30+40)
a+b+(70)
a+b+70
a+b+70
a+b70
(18)+10+20
10+20
30
30
30
(19) 3
5
(20)3
4
5

shivamsharma
Автор

(1)
1)C=>/** */
2)A=>//
3)B=>/* */
4)C=>/** */


(2)
Run fails class not found

(3)
3

(4)
c=30


(5)
b1:10
b2:char cannot converted into byte
b3:a
s1:254
d:37.435
f:37.435f
l:10L
ch2:error

(6)
6, 8, 9, 10, 11

(7)
3, 5, 6

(8)
3, 4, 5, 6, 7

(9)
1, 2, 3, 6, 7, 12

(10)
3, 4

(11)
2

(12)
2

(13)
3.1400, 3.140000

(14)
3, 5

(15)
10
error
a
10.0
10.345f
30L
30L
70

(16)
70
10, 20, 30
20, 30
20, 30
20, 30, 30
30, 30

(17)
70
a+b

(18)
0
70
70
70
a+b+70
a+b70

(19)
30
30
30
30
30
30

(20)
5
8
11
13
17
18

(21)
1, 4

RiyaTiwari-tp
Автор

Q2= D
Q3= F
Q4 = 30
Q5 = b1: 11
Q6= 4
Q7 = 6
Q8 = 5, 6, 7, 8
Q9 = 6, 7, 12
Q10 =314.00
Q11= 4, 5, 6, 7
Q12= 4
Q13= 10
97
a
10.0
10.343f
30L
30L
70

Q 15= 70
Q 16= a+b
a+b ab
a+b3040
a+b3040
a+b3040
a+b3040

Q17= a+bab
a+b70
a+b70
a+b70
a+b70
a+b70
a+bb70

q18 = 30
10 20
30
30
30
30

Q19= 4, 5, 6, 9, 13, 14, 16, 18

Q20= Error

ritikchoudhry
Автор

q1. a=2.
b=3.
d=3.

q2.= a
q3 =
q4= 30,
q5=10, a, 254, 37.435, 37435, 10, error
q6=30, 7, 9, 10
q7=5, 6, 7
q8=4, 5, 8
q9= 2, 5, 6, 7, 10, 12
q10=10, a, a,
q11=4
q12=3, 4
q13=
q14=
q15=70, error
q16=
q17=
q18= _1020, 10_20, 30_, 30_, 30_, 30
q19=4, 5, 7, 9
q20=

MalviyaRaj-zg
Автор

Q1 :- 1 = c
2 = A
3 = B
4 = D
Q2 :- (D) Run fails class not found;
Q3 :- (c) 2
Q4 :-
Q5 :- error;
Q6 :- 8th line.
Q7 :- 4th line.
Q8 :- 6th line.
Q9 :- 2 line.
Q10 :- 300, 300.0;
Q11 :- error
Q12 :- 5
Q13 :- 10, a, a, 10.0, 10.345000, 30, 50
Q15 :- 70, a+b;
Q16 :- a+bab, a+b70, a+b3040, a+b3070, a+b3040;
Q17 :- b
Q18 :- 30, 10, 20, 30, 30
Q19:- 3 line
Q20 :- 1

deeprajshukla
Автор

Q1 1-b, 2-c, 3-a, d-4
Q2 D
Q3 B
Q4 c=30

Q5 10
Q6 9 line
Q7 line 4
Q8 line 7
Q9 line 8
Q10 line 4
Q11 line 5
Q12 line 4
Q13
Q14 line 7
Q15 line 5
Q16
Q17
Q18 70, a+b
Q19 a+b0, a+b70, ab3040, ab3040, ab3040
Q20 a+b0, a+b70, a+b70, a+b70
Q21 1020, 1020, 30, 30, 30, 30

madhavvyas
Автор

Q1. CABC
Q.2 Hello Test
Q.3 Error
Q.4 ____
Q.5 b1: 10
b2: 97
s1: 254
d: 37.435
f: 37.435
l: 10
ch2: A
Q.6 6, 8, 9, 10, 11
Q.7 3, 6
Q.8 3, 4, 5
Q.9 2, 3, 4, 5, 6, 7, 12
Q.10 2, 3, 4
Q.11 5, 3, 2
Q.12 3, 5, 4
Q.13 10
a
a
10.0
10.345
30
30
70
Q 14 7
Q.15 error
Q.16 ___?
Q.17 70, a+b
Q.18 30
30
30
Q. 19 Byte b2= il;
Int i= true;
Int i = (int)true
Float F1= l1
Byte b3 = i2
Char ch2= i4
Long l2= (long)f1
Q. 20 not give output

dollylashkari
Автор

queston no 01
1 = c
2 = A
3. B
4.d

question no 02
option A and C

question no 04
c = 30
f2 = error

question no 05
b1 = error
b2 = 97
s1 = 254
d=37.435
f=37.435000
l=10
ch2 =error

question no 07
line no 04 is wrong

question no 13
10
97
a
10.0
10.3450
30
30
70

question no 09
no valid expression

question no 15
70
a+b

question no 16
a+bab
a+b3040
a+b3040
a+b3040
a+b3040
a+b3040
a+b3040

question no 17
a+bb
a+b70
a+b70
a+b70
a+b70
a+b70

question no 18
1020
10 20
30
30_
30_
30

question no 20
error in all

question no 14
1. c=70
2. the addition of 30 and 40 is 70
3.the addition of 10 and 20 is 30
4.the addition of 10 and 20 is 30
5.the addition of +10and +20+is 30
6.the addition of 10 and 20 is 30
7>the addition of 10 and 20 is 30
8.the addition of 10and 20 is 30
9.the addition of 10 and 20 is 30
10.the addition of 10 and 20 is +30
11.the addition of 10 and 20is 30

shivanipunasiya
Автор

Ans 1= c
a
b
d

Ans 2= Hello Test1
Ans 3 = nahi aaya
Ans 7 = 3, 5
Ans 8=6, 5, 3, 4
Ans 9=5, 6, 4
Ans 10 =3, 4
Ans 11=2, 5
Ans 12 =3
Ans 13 = 10, 0, a, 10.0, 10.345f, 30L, 30L, 70
Ans 14 =The addition of 30 and 40 is 70
The addition of 10 and 20 is 30
The addition of 10 and 20 is 30
The addition of 10 and 20 is 30

Ans 15 = 70
a+b

Ans 16=a+b
a+b 70
a+b 30 40
a + b30+ 40
a+b30+40
a+b30+40

Ans17 =a+b 0
a+b 70
a+b 70
a+b 70
a+b 70
a+b70

Ans 18 = 30
10, 20
30
30
30
30

Ans 19 =byte b2 =i1
int i =true
byte b3 =i2
int i3 =ch1
char ch =i4
float t1 =l1

Ans 20 not output

NamrataYadav-be
Автор

Q1
ans =a=>2
b=>3
c=>4
d=>1

Q2
ans=D

Q3
ans=B

Q4


Q5
ans 10, 97, a, 254

Q6
ans 8, 9;

Q7
ans 6;

Q8
ans 5;

Q9
ans 7, 12;

Q10
ans 3;

Q11
ans 2, 5;

Q12
ans 2;

Q13
ans 3, 6;

Q14
ans 3;

Q15
ans 2, 3;

aayushgupta
welcome to shbcf.ru