Answer:
Option (4) is the correct answer.
Explanation:
In Java programming language ,array collection starts from 0 index location and ends in a size-1 index location. So to access the last elements the user needs to use a[Size-1] statement. so to modify the value of the last location of the array the user needs to use "a[size-1]= element;".
But when the user wants to add some new value to the end of the array list collection then he needs to use the statement--
a.add(element); //where add is a function, element is a value and a is a array list object.
Another option is invalid because--
- Option 1 is not the correct because "a[3]=element;" modify the value of the 3rd element of the array.
- Option 2 gives a compile-time error because add functions bracts are not closed.
- Option 3 gives the error because a[4] gives the location of the 5th element of the array but the above question says that a is defined with 4 elements.
Answer:
The Update statement in the DML is used for changing existing data in a table.
Explanation:
Their are following Sql statement in the DML.
Insert
This SQL statement is used for inserting data into the table.
select
This SQL statement is used for retrieving data from database
update
This SQL statement is used for updating data in a table.
delete
This SQL statement is used for delete data from database .
The "UPDATE" SQL statement in DML is used for Modify the data in the existing table .
Following are the syntax of Update SQL query
Update tablename
set column1=value1,column2=value2............column N=valueN
Where condition;
Example :Suppose we have student table and (rollno,name,age and add) are the field for that table we have to change the address of rollno 105
Then we use update query like that
UPDATE STUDENT
SET add='kalam nagar'
where rollno=105;
Answer:
A server stores data for a client computer to access and use, and pretty self eplanitory for a client computer
Explanation:
Answer:
a) the Statement is Invalid
b) the Statement is Invalid
Explanation:
a)
lets Consider, s: student of my class
A(x): Getting an A
Let b: john
I have a student in my class who is getting ab A: Зs, A(s)
John need not be the student i.e b ≠ s could be true
Hence ¬A(b) could be true and the given statement is invalid
b)
Lets Consider G: girl scout
C: selling 50 boxes of cookies
P: getting prize
s: Suzy
Now every girl scout who sells at least 50 boxes of cookies will get a prize: ∀x ∈ G, C(x) -> P(x)
Suzy, a girl scout, got a prize: s ∈ G, P(s)
since P(s) is true, C(s) need not be true
Main Reason: false → true is also true
Therefore the Statement is Invalid