Rahul Java Programs
Rahul Java Programs
(Use Any programming Language which you comfortable, Post your answer to me separately)
Raj:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1: Ask user to input starting day and the number of days in a month. Find the number of times every
day occurs in that month. Ex: Input : Number of days in month = 30 , First day = Tuesday
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
import java.util.*;
import java.lang.*;
"Tuesday", "Wednesday",
"Thursday", "Friday",
"Saturday", "Sunday" };
count[i] = 4;
int pos = 0;
if (firstday == days[i])
pos = i;
break;
// will be 5
if (i > 6)
count[i % 7] = 5;
else
count[i] = 5;
// Driver function
int n = 31;
occurrenceDays(n, firstday);
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
FROM students
GROUP BY subject_code;
"AVG" is a type of "Multirows function (MRF)" and we cannot write MRF's in WHERE clause because
MRF's executes group-by-group and WHERE clause executes row-by-row. But we can write MRF's in
having clause. So the correct query would be
SELECT subject_code,AVG(marks)
FROM students
GROUP BY subject_code
HAVING AVG(marks)>75
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4: What HTTP Status Code 409 states in web-service, explain with example.
If there is a record exist in DB and we do post for that same record in that case server will return 409
error code
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5: An apple costs 40 cents, a banana costs 60 cents, and a grapefruit costs 80 cents. How much does a
pear cost?
So from above examples we can say that each vowel is equals to 20cents. So Pear --> 2 vowels-->
40cents. So answer is Pear costs 40cents.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A: A manhole round can be rotate in any ways and it will not fall into it. So it is safer to use round than
square. Square will fall in to it
B: Manhole cover is round because we can transfer that cover from one place to another by simply
rotating the cover , so it more easier than any other shapes
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
As a general rule, managers prefer “good and on time”, as they don’t appreciate work to stay pending
because of the employees’ need for perfection.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Never bad-mouth previous colleagues and ex-employees. Instead of focusing on the details of the
incident, put more emphasis on the part where you managed to make him see your point-of-view.
For example − “They were thinking from a different point of view, but in the end, they managed to
understand my concerns as well.”