3i Infotech Papers: Sample Questions 946 - 947 of 1245

Examrace Placement Series prepares you for the toughest placement exams to top companies.

Question number: 946

» Languages » Java

Essay Question▾

Describe in Detail

What is statement in java?

Explanation

  • “Statement” provides methods to execute queries on the the database.

  • Statement interface is a factory of ResultSet.

  • Provides factory method to get the object of ResultSet.

Methods of Statement interface:

  1. Public ResultSet executeQuery

    • Used to execute SELECT query.

    • Return the object of ResultSet

    • Public int executeUpdate

    • Used to excute specified query.

    • It create, drop, insert, update, delete.

      Used to execute batch of commands.

  2. Public boolean execute

    • Used to execute queries that may return multiple results.

    • Public int [] executeBatch

Methods of Statement interface

Methods of Statement Interface

Methods of Statement interface

Question number: 947

» Aptitude

MCQ▾

Question

A man speaks the truth out of times. He throws a die and reports it to be a . What is the probability of it being a ?

Choices

Choice (4) Response

a.

b.

c.

d.

None of the above

Answer

a.

Explanation

Probability of getting on a die

Probability of not getting

Probability of the man getting on a die and reporting it as

Truth .

Probability of the man NOT getting in a die and reporting it as

Lying

Required probability is the probability of getting the and the man not lying,