Maersk - UI & JS


  UI & JS

1.   Choose the correct javascript syntax to change the content of the following.

<p id=”maersk”>Hello World!</p>

o  document.getElement(‘maersk’).innerHTML=”Hello Maersk!”;

o  document.getElementById(‘geek’).innerHTML=’Hello Maersk!’;

o  document.getId(‘maersk’)=’Hello Maersk!’;

o  document.getElementById(‘maersk’).innerHTML=’Hello Maersk!’;

2.   Which of the following annotation of JAX RS API is used to annotate a method used to create resource?

o  @GET

o  @Path

o  @PUT

o  @POST

3.   Which of the following is a best practice to create standard URI for a web service?

o  Avoid using spaces

o  Use lowercase letter

o  Use plural noun

o  All of the above

4.   What is the html tag under which one can write javascript code?

o 

o 

o  ‘<js>

o  ‘<javascript>

5.   Predict the output of the following code:

var prod = “Hello”;

console.log(typeof(prod));

prod=1;

console.log(typeof(prod));

o  string

integer

o  string

number

o  string

string

o  string

int

o  string

Error (Cast exception: cannot cast int as string);

6.   Which of the following HTTP Status code means BAD REQUEST, states that invalid input is provided e.g. validation error, missing data?

o  401

o  409

o  404

o  400

7.   RestTemplate class method which performs an HTTP HEAD operation

o  postForLocation(String, Object, Object…)

o  headForHeaders(String, Object…)

o  getForObject(String, Class, Object…)

o  postForObject(String, Object, Class, Object…)

8.   How do you display a border like this

top border: 8 pixel

bottom border: 6 pixel

left border: 4 pixel

right border: 2 pixel

o  border-width: 4px 2px 6px 8px;

o  border-width: 8px 6px 4px 2px;

o  border-width: 2px 4px 6px 8px;

o  border-width: 6px 8px 4px 2px;

o  border-width: 8px 2px 6px 4px;

No comments:

Post a Comment