Q1) Find discrepancy in the tables given below.
ENO
|
ENAME
|
AGE
|
DNO
|
101
|
MOHIT
|
28
|
A01
|
102
|
RAHUL
|
30
|
A02
|
103
|
SONIA
|
23
|
A01
|
104
|
NIKHIL
|
45
|
A03
|
105
|
GARIMA
|
38
|
A04
|
DEPARTMENT
DNO
|
DNAME
|
DLOCATION
|
A01
|
HUMAN RESOURCE
|
NOIDA
|
A02
|
IT
|
DELHI
|
A03
|
ADMINISTRATION
|
DELHI
|
ANSWER: Department A04 does not exist in its parent table department,
hence it can not be mentioned as dno(a04) in employee table. This will
result in an error.
q2)create jumbled word like this : RoUtInE
String a = jTextField1.getText(); String u=a.toUpperCase();
int b = a.length();
String c = ""; int i;
while (i<b)
{ if(i%2!=0) String k = u.substring(i,i+1).toLowerCase(); else String k = u.substring(i,i+1);
c=c.concat(k);
i++;
}
System.out.print(k);
Q1) Find discrepancy in the tables given below.
ENO
|
ENAME
|
AGE
|
DNO
|
101
|
MOHIT
|
28
|
A01
|
102
|
RAHUL
|
30
|
A02
|
103
|
SONIA
|
23
|
A01
|
104
|
NIKHIL
|
45
|
A03
|
105
|
GARIMA
|
38
|
A04
|
DEPARTMENT
DNO
|
DNAME
|
DLOCATION
|
A01
|
HUMAN RESOURCE
|
NOIDA
|
A02
|
IT
|
DELHI
|
A03
|
ADMINISTRATION
|
DELHI
|
ANSWER: Department A04 does not exist in its parent table department,
hence it can not be mentioned as dno(a04) in employee table. This will
result in an error.
q2)create jumbled word like this : RoUtInE
String a = jTextField1.getText(); String u=a.toUpperCase();
int b = a.length();
String c = ""; int i;
while (i<b)
{ if(i%2!=0) String k = u.substring(i,i+1).toLowerCase(); else String k = u.substring(i,i+1);
c=c.concat(k);
i++;
}
System.out.print(k);
Tell two different methods to convert integer/ double/ float to String form.(toString(),valueOf()) | | | |
|
Ms.Geeta created two tables with city as primary key in table1 and foriegn key in table 2. While inserting some set of values, she is facing a problem that she is unable to enter a value in column city of table2. what must be the reason/? ans: Ms. geeta must be trying to enter the value which is not present in column city of table1. |
|
| |
|
|
No comments:
Post a Comment