1. Find the output
a. 6/5
b. 5/6
c. 5 + 6.3
d. 5.4 + 5.6
e. 4 + 15/4
f. 4.0 + 15/4.0
g. 6 + 4 * 3
h. (6 + 4) * 3
2. Find the output
A=10 , B=12
a. C=A++ + 10
b. C=A++ + A++
c. C=A++ + ++A
d. C=A++ + B++
e. C=A++ + ++B + ++A
f. C=A++ + ++B
g. C=A++ + ++B + A++
h. C=A++ + B++ + ++B
i. C=A++ + ++B + ++A + ++B
j. C=A++ + B++ + 12 + ++A
k. C=A++ + ++B + ++A + A++
l. C=A++ + B++ + ++B
m. C=A++ - ++B + ++A - ++B
n. C=A++ - B++ - 12 + ++A
o. C=A++ + --B + --A + A++
p. C=A-- + B--
q. C=A++ + --B + --A
r. C=A-- + --B
s. C=A-- + ++B + A--
3. Find the output
A=10, B=5
a. A+=10
b. A-=10
c. A*=10
d. A/=10
e. A%=10
f. A+=A++
g. A+=A++ +10
h. A+=A++ + ++A
i. A-=A++/2
j. A-=++A/2.0
k. C=A++ / 5
l. C=++A / 5
m. C=A++ % 5
n. C=++A % 5
o. C=A++/5 + ++B/5
p. C=A++/5 + ++B%5
q. C=A++%5 + ++B/5
r. C=A++%5 + ++B%5
Give the Computer Expression for the Mathematical Expression
a. C=2A
b. C=2A + 2B
c. C=2AB
d. C=A2 + B2
e. C=(A + B)2
f. C=A2 + B2 +2AB
g. C=A3 + B3 + 3A2B + 3AB2
h. C=√A + √B
i. C=(√A + √B)2
j. PE=MGH
k. KE=1/2 MV2
l. SI=PRT/100
m. A=2(L+B)
n. A=√[S(S-A)(S-B)(S-C)]
o. C=10% OF A
p. A=ΠR2
q. C=[Ax{Bx(A+B)}]
r. A=P+(1 + R/100)N
Give the output of the Mathematical Function
a. Math.pow(3,2)
b. Math.pow(3,2) + Math.pow(4,2)
c. Math.sqrt(16)
d. Math.sqrt(16) + Math.sqrt(25)
e. Math.pow(Math.sqrt(16),2)
f. Math.abs(-5)
g. Math.abs(-5) * Math.sqrt(25)
h. Math.pow(Math.abs(-5) * Math.sqrt(25), 2)
i. Math.floor(6.4)
j. Math.ceil(6.4)
k. Math.floor(-16.4)
l. Math.ceil(-16.4)
m. Math.sqrt(Math.floor(Math.abs( -16.4)))
n. Math.max(9,6)
o. Math.max(-15,-12)
p. Math.max(9.6,6.3)
q. Math.max(-15.5,-12.2)
r. Math.min(9,6)
s. Math.min(-15,-12)
t. Math.min(9.6,6.3)
u. Math.min(-15.5,-12.2)
v. Math.min(Math.max(-15.5,-12.2),2)
w. Math.max(Math.min(-15.5, Math.floor(-12.2),2)
Find the output
a) char a=’A’ ; short b=12 ;
int c=16;
int d=a+b+c;
System.out.println(d);
b) char a=’A’ ; short b=1 ; int c=1;
char d=(char)(a+b+c);
System.out.println(d);
c) System.out.println(“Four”+4+4);
d) System.out.println(“Four”+(4+4));
e) System.out.println(4+4+“Four”);
f) System.out.println((4+4)+“Four”);
g) System.out.print(“My Java”)
System.out.println(“program”);
h) System.out.println(“Java \n program”);
i) System.out.println(“My \n \t Java \n \t \t
program”);
j) System.out.print(“How”);
System.out.print”Are”);
System.out.print”You”);
Give the Mathematical function for the following
a. Find the absolute value of -5
b. Find the square root of 16
c. Find the cube root of 27
d. Find the value of x to power of y
e. Find the value of 23
f. Find the sum of square root(16) and square
root(9)
g. Find the nearest integer value of (15.3)
h. Find the nearest integer value of (15.8)
i. Find the lower integer value of (19.3)
j. Find the higher integer value of(21.37)
k. Find the maximum between 12,24
l. Find the minimum between 12,34
m. Find the maximum between 12,24,6
n. Find the minimum between 12,34,16
o. Find the value of PI
Write the Java program for the following\
To add two numbers where a=10 and b=12
Formula : c=a+b
To subtract two numbers where a=10 and b=2
Formula : c=a-b
To add and subtract two numbers where a=15 and b=24
Formula : c=a+b
d=a-b
To find the velocity where d=100m and t=3s
Formula : v=d/t
To find the area of a rectangle where length=10cm and breadth=8cm
Formula : a=l*b
To find the area and the perimeter of a square where side=4cm
Formula : a=s*s p=4*s
To find the average temperature of the day if the maximum temperature =40 and minimum
temperature =28
Formula : avg=(max+min)/2
To calculate the profit and profit percentage where cp=100 and sp=120
Formula : p=sp-cp pp=p/cp*100
To calculate the simple interest and the amount where p=Rs10,000 r=10%, t=2 years
Formula : si=p*r*t/100
To find the area of a circle where radius=8cm
Formula : a=3.142 * Math.pow(r,2)
To find the area and the circumference of a circle where diameter=14cm
Formula : a=Math.PI * Math.pow(d/2,2)
P=2*Math.PI*d/2
To find the compound interest and amount if p=1000, r=10% and time=5 years
Formula : p*Math.pow((1+r/100),t)
To calculate the equivalent Fahrenheit temperature for the Celsius temperature =100
Formula : f=9*c/5+32
To calculate the Potential energy of the body if mass=100Kg, height = 10m and gravity=9.8m/s
Formula : PE=M*G*H
To calculate the potential energy if mass=100Kg and velocity=10m/s
Formula : KE=0.5*m*v*v
To find the average temperature of the week if the day temperature is as follows
Sunday =40
Monday=38
Tuesday=35
Wednesday=34
Thursday=36
Friday=32
Saturday=35
Formula : Avg=(s+m+tu+w+th+f+st)/7
To calculate the total and average for a student who has got 90 in Math, 80 in English, 70 in Hindi, 65 in Physics, 85 in Chemistry, 88 in Biology and 78 in Social Studies.
Formula : t=(m+e+h+p+c+b+s)/7
To Calculate the DA and HRA and PF and display the Gross and Net of an Employee. The Basic Salary of the Employee is Rs. 15,000.
DA=40% of BS
HRA=20% of BS
Gross=BS+DA+HRA
PF=10% of Gross
Net=Gross-PF
To calculate the square root, cube root, square and Cube of the number given and display the
individual result. The number is 125
Formula : sr=Math.sqrt(n) cr=Math.cbrt(n)
S=Math.pow(n,2) c=Math.pow(n,3)
To convert the distance from kilometer to meter. The distance given is 10Km
Formula : m=1000*km
To convert the distance from kilometer to meter, centimeter and millimeter. The distance given is
2.365 Km.
Formula : m=1000*km Cm=m*100
Mm=Cm*10
To convert Kilobytes to Bytes and Bits. The capacity of the disk is 100Kilobytes
Formula : b=1024 * kb bits=b*8
To convert temperature from degree Fahrenheit to degree Celsius. The given Fahrenheit
temperature is 212 degree Fahrenheit
Formula : c=5*(f-32)/9
a. 6/5
b. 5/6
c. 5 + 6.3
d. 5.4 + 5.6
e. 4 + 15/4
f. 4.0 + 15/4.0
g. 6 + 4 * 3
h. (6 + 4) * 3
2. Find the output
A=10 , B=12
a. C=A++ + 10
b. C=A++ + A++
c. C=A++ + ++A
d. C=A++ + B++
e. C=A++ + ++B + ++A
f. C=A++ + ++B
g. C=A++ + ++B + A++
h. C=A++ + B++ + ++B
i. C=A++ + ++B + ++A + ++B
j. C=A++ + B++ + 12 + ++A
k. C=A++ + ++B + ++A + A++
l. C=A++ + B++ + ++B
m. C=A++ - ++B + ++A - ++B
n. C=A++ - B++ - 12 + ++A
o. C=A++ + --B + --A + A++
p. C=A-- + B--
q. C=A++ + --B + --A
r. C=A-- + --B
s. C=A-- + ++B + A--
3. Find the output
A=10, B=5
a. A+=10
b. A-=10
c. A*=10
d. A/=10
e. A%=10
f. A+=A++
g. A+=A++ +10
h. A+=A++ + ++A
i. A-=A++/2
j. A-=++A/2.0
k. C=A++ / 5
l. C=++A / 5
m. C=A++ % 5
n. C=++A % 5
o. C=A++/5 + ++B/5
p. C=A++/5 + ++B%5
q. C=A++%5 + ++B/5
r. C=A++%5 + ++B%5
Give the Computer Expression for the Mathematical Expression
a. C=2A
b. C=2A + 2B
c. C=2AB
d. C=A2 + B2
e. C=(A + B)2
f. C=A2 + B2 +2AB
g. C=A3 + B3 + 3A2B + 3AB2
h. C=√A + √B
i. C=(√A + √B)2
j. PE=MGH
k. KE=1/2 MV2
l. SI=PRT/100
m. A=2(L+B)
n. A=√[S(S-A)(S-B)(S-C)]
o. C=10% OF A
p. A=ΠR2
q. C=[Ax{Bx(A+B)}]
r. A=P+(1 + R/100)N
Give the output of the Mathematical Function
a. Math.pow(3,2)
b. Math.pow(3,2) + Math.pow(4,2)
c. Math.sqrt(16)
d. Math.sqrt(16) + Math.sqrt(25)
e. Math.pow(Math.sqrt(16),2)
f. Math.abs(-5)
g. Math.abs(-5) * Math.sqrt(25)
h. Math.pow(Math.abs(-5) * Math.sqrt(25), 2)
i. Math.floor(6.4)
j. Math.ceil(6.4)
k. Math.floor(-16.4)
l. Math.ceil(-16.4)
m. Math.sqrt(Math.floor(Math.abs( -16.4)))
n. Math.max(9,6)
o. Math.max(-15,-12)
p. Math.max(9.6,6.3)
q. Math.max(-15.5,-12.2)
r. Math.min(9,6)
s. Math.min(-15,-12)
t. Math.min(9.6,6.3)
u. Math.min(-15.5,-12.2)
v. Math.min(Math.max(-15.5,-12.2),2)
w. Math.max(Math.min(-15.5, Math.floor(-12.2),2)
Find the output
a) char a=’A’ ; short b=12 ;
int c=16;
int d=a+b+c;
System.out.println(d);
b) char a=’A’ ; short b=1 ; int c=1;
char d=(char)(a+b+c);
System.out.println(d);
c) System.out.println(“Four”+4+4);
d) System.out.println(“Four”+(4+4));
e) System.out.println(4+4+“Four”);
f) System.out.println((4+4)+“Four”);
g) System.out.print(“My Java”)
System.out.println(“program”);
h) System.out.println(“Java \n program”);
i) System.out.println(“My \n \t Java \n \t \t
program”);
j) System.out.print(“How”);
System.out.print”Are”);
System.out.print”You”);
Give the Mathematical function for the following
a. Find the absolute value of -5
b. Find the square root of 16
c. Find the cube root of 27
d. Find the value of x to power of y
e. Find the value of 23
f. Find the sum of square root(16) and square
root(9)
g. Find the nearest integer value of (15.3)
h. Find the nearest integer value of (15.8)
i. Find the lower integer value of (19.3)
j. Find the higher integer value of(21.37)
k. Find the maximum between 12,24
l. Find the minimum between 12,34
m. Find the maximum between 12,24,6
n. Find the minimum between 12,34,16
o. Find the value of PI
Write the Java program for the following\
To add two numbers where a=10 and b=12
Formula : c=a+b
To subtract two numbers where a=10 and b=2
Formula : c=a-b
To add and subtract two numbers where a=15 and b=24
Formula : c=a+b
d=a-b
To find the velocity where d=100m and t=3s
Formula : v=d/t
To find the area of a rectangle where length=10cm and breadth=8cm
Formula : a=l*b
To find the area and the perimeter of a square where side=4cm
Formula : a=s*s p=4*s
To find the average temperature of the day if the maximum temperature =40 and minimum
temperature =28
Formula : avg=(max+min)/2
To calculate the profit and profit percentage where cp=100 and sp=120
Formula : p=sp-cp pp=p/cp*100
To calculate the simple interest and the amount where p=Rs10,000 r=10%, t=2 years
Formula : si=p*r*t/100
To find the area of a circle where radius=8cm
Formula : a=3.142 * Math.pow(r,2)
To find the area and the circumference of a circle where diameter=14cm
Formula : a=Math.PI * Math.pow(d/2,2)
P=2*Math.PI*d/2
To find the compound interest and amount if p=1000, r=10% and time=5 years
Formula : p*Math.pow((1+r/100),t)
To calculate the equivalent Fahrenheit temperature for the Celsius temperature =100
Formula : f=9*c/5+32
To calculate the Potential energy of the body if mass=100Kg, height = 10m and gravity=9.8m/s
Formula : PE=M*G*H
To calculate the potential energy if mass=100Kg and velocity=10m/s
Formula : KE=0.5*m*v*v
To find the average temperature of the week if the day temperature is as follows
Sunday =40
Monday=38
Tuesday=35
Wednesday=34
Thursday=36
Friday=32
Saturday=35
Formula : Avg=(s+m+tu+w+th+f+st)/7
To calculate the total and average for a student who has got 90 in Math, 80 in English, 70 in Hindi, 65 in Physics, 85 in Chemistry, 88 in Biology and 78 in Social Studies.
Formula : t=(m+e+h+p+c+b+s)/7
To Calculate the DA and HRA and PF and display the Gross and Net of an Employee. The Basic Salary of the Employee is Rs. 15,000.
DA=40% of BS
HRA=20% of BS
Gross=BS+DA+HRA
PF=10% of Gross
Net=Gross-PF
To calculate the square root, cube root, square and Cube of the number given and display the
individual result. The number is 125
Formula : sr=Math.sqrt(n) cr=Math.cbrt(n)
S=Math.pow(n,2) c=Math.pow(n,3)
To convert the distance from kilometer to meter. The distance given is 10Km
Formula : m=1000*km
To convert the distance from kilometer to meter, centimeter and millimeter. The distance given is
2.365 Km.
Formula : m=1000*km Cm=m*100
Mm=Cm*10
To convert Kilobytes to Bytes and Bits. The capacity of the disk is 100Kilobytes
Formula : b=1024 * kb bits=b*8
To convert temperature from degree Fahrenheit to degree Celsius. The given Fahrenheit
temperature is 212 degree Fahrenheit
Formula : c=5*(f-32)/9
BASIC THEORY QUESTIONS OF JAVA
ReplyDelete