Real MCQ
Real MCQ
bt- Notepad
File Edit Format View Help
***********PK***********
1)110 113
fest
void
public validateCustomerNameValid Test3(){
Assertion.assertFalse (Validator.isvalidcustomerName ("Aabel james"));
eTest
public void valldateCus tomerNameVa lidTest4 (){
Assertion.assertEquals(Validator. isValidCustomerName ( "Aabel james"),false);
Set.add ("A");
Set.add("8");
Set.add("C");
Set.add("D");
et.add(°B");
IteratorString itertorset.iterat-set.Iterator();
Wnieiterator.nasnexti
if(iterator.next()=*5°
set.remove(iterator.next())
syso(iterator, next ());
5)Time-23:58:15
7) BANK
Notepad
File Edit Format View Help
6)String url -"http://localhost : 5555/citizens/{citizenType);
7) BANK
9)@NamedQuery(name- "Order. findNameByCustomerEmailId", query-"SELECT 0.customerNane FROM Order o WHERE p.customerEmailld=: emailld")
13)it will delete batch with batch_ID-1002 from 8ATCHt able and then throw EmptyResultDataAc cess Exception
*********************************SD *********************************************
17)[18,36,18,78, 480
18)2022-08-09
19){null-null, A=Avan, B=Bob, C-Catlyn}
20)Linel:@NotNull
ine2:@NotNull @Pattern(regexp-"[A-Za-z]")
Line3:@PatOrPresent
23)it will delete customer with customer_Id 1 from CUSTOMER table and instruments with instrumentname Mouth Organ and Spanish Guitar from INSTRUMENT table
24)restTemplate . delete(url, studentId)
25)110
117
1s Correct ans.
Notepad
File Edit Format View Help
26)option 8iven are
a w1th the Mind
1owing
102-stand 5y Me
null-Annes son8
164-Here I am
syso(amountList)
option given are:
a)5000.0,56001.4
b)[2800e2 .4]
C2500.0,28000.7]
d)Illegal1StateException exception will be thrown
ANSWER: D)Illega1StateException exception will be thrown
* * * * * * * * * *
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
31)[email protected]
- *
Notepad
File Edit Format View Help
31)[email protected]
32)public class DateTester(
ANSWER: SUNDAY
- ---------------------
33)http://localhost: 8080/api/products?id=10818name=Laptop
****
34) QUESTIONhttp://localhost:8765/sellers/1000?
ANSWER ConstraintViolation Exception exception will be thrown
****************** *******
35) AUTHOR:
author
BOT
id name
James
1002 Tom
BOOK:
book1a
a book name auth_1d
Right Thing
2002 Wonderlana 1902
Potter Bloom 1002
2004 ey 1o Success
* * * * *
*************************************
ListProduct>findByManufacturedDateAfter(LocalDate date);
- - - - - - - - - *
- ********
37)Name-Honica will be displayed and Nul1PointerException will be thrown
- - -
-
Assertion. assertFalse(citizen.isVoter(17));
------.-.. -------*****sY************
40)LocalDate localDate-LocalDate of (2020, 8, 12)
ANSWER: 2022-08-09
.
ejoincoloumn(name="stream_id"
&
@OneToMany(cascade CascadeType.ALL)
ejoincoloumn(name="stream_id", unique-true)
- -
42)sequence_name next_v
cust
Notepad
File Edit Format View Help
36)1,2,4 option are correct.
ListProduct>findByManufacturedDateAfter(LocalDate date) ;
* * * * * * * * * * * *
- - - - - - - - - - .
***
39)Assertion. assertEquals (true, citizen. isVoter(18) );
Assertion.assertFalse(citizen. isVoter(17)) ;
------- ----*****SY************
40)LocalDate localDate=Loca1Date.of(2020,8,12)
ANSWER: 2022-08-89
OneToMany(cascade - CascadeType.ALL)
1000
cust
ANSWER: 1081
*******************************
Notepad
File Edit Format View Help
46)9:59:45
****------
53)Line1-@RestControllerAdvice
Line2-@ExceptionHandler(TravelBookingException class) .
*******
4 which of the tollowing method is properly mapped to hand le the http get request with URI /students/S1161
Choose c o r r e c t option.
)9Reaues tMaooina( " / s t u d e n t s / f s t u d e n t I d l " .method -Reaues tMethod . GET)