i want question 4full Solution please...
#java..
it's model paper...2019
Attachments:
Answers
Answered by
6
a) -ADVANTAGES OF AR RAY
▶Array can store multiple values of same data types at a same time .
▶They values stored in an array can be invoked any time by a for or while loop.
▶Data stored can easy be arranged into its decreasing and increasing order
▶Values can be invoked anywhere and can be compared or can be changed.
b) -LINEAR SEARCH
▶It will work for both sorted and unsorted data .
▶The search begins by comparing that particular value to all the values in the array from starting.
BINARY SEARCH
▶It works only for sorted data, whether ascending or descending.
▶In this array is divided into two parts and then value is searched depending on the value is greater or smaller .
c) -
T=0
I=1
T=2
I=3
L=4
I=5
=6
A=7
T=8
T=9
A=10
C=11
K=12
E=13
D=14
=15
O=16
N=17
=18
1=19
1=20
T=21
H =22
=23
O=24
C=25
T=26
O=27
B=28
E=29
R=30
▶i= 26
Character . toLowerCase(str . CharAt(i))
Character . toLowerCase(str . CharAt(26))
t
▶i=26-6=20
Character . toLowerCase(str . CharAt(i))
Character . toLowerCase(str . CharAt(20))
t
▶i=20-6=14
Character . toLowerCase(str . CharAt(i))
Character . toLowerCase(str . CharAt(d
14))
d
▶i=14-6=8
Character . toLowerCase(str . CharAt())
Character . toLowerCase(str . CharAt(8))
t
▶i=8-6=2
Character . toLowerCase(str . CharAt(i))
Character . toLowerCase(str . CharAt(2))
t
▶i=2 - 6= -4
Loop will execute but will not print the value.
d) - Two jump statements are
▶Break
▶Continue
e) a = -9.5
Math . round prints the round off= -9.0
Math . rint prints the round off= -9.0
Rounded value =-9.0
Rinted value = -9
maihuterimaa:
thanks a lot ❤
Similar questions
English,
1 year ago
India Languages,
1 year ago