PrepAway - Latest Free Exam Questions & Answers

Match the Java methods to the corresponding SQL data types

Mix and match
QUESTIONSQL Type Java Method
FLOAT
INTEGER
LONGVARBINARY
LONGVARCHAR
NUMERIC
OTHER
Java Method
getDouble(.
getInt(.
getBytes(.
getString(.
getBigDecimal(.
getObject(.
Match the Java methods to the corresponding SQL data types

PrepAway - Latest Free Exam Questions & Answers

A.
SQL Type Java Method
FLOAT getDouble(.
INTEGER getInt(.
LONGVARBINARY getBytes(.
LONGVARCHAR getString(.
NUMERIC getBigDecimal(.
OTHER getObject(.

B.
SQL Type Java Method
LONGVARBINARY getDouble(.
INTEGER getInt(.
FLOAT getBytes(.
LONGVARCHAR getString(.
NUMERIC getBigDecimal(.
OTHER getObject(.

C.
SQL Type Java Method
NUMERIC getDouble(.
INTEGER getInt(.
LONGVARBINARY getBytes(.
LONGVARCHAR getString(.
FLOAT getBigDecimal(.
OTHER getObject(.

D.
SQL Type Java Method
FLOAT getDouble(.
INTEGER getInt(.
LONGVARCHAR getBytes(.
LONGVARBINARY getString(.
NUMERIC getBigDecimal(.
OTHER getObject(.

Explanation:
According to the online Java tutorial provided by Sun at java.sun.com
Memorize the list belowSQL Type Java Method
BIGINT getLong(.
BINARY getBytes(.
BIT getBoolean(.
CHAR getString(.
DATE getDate(.
DECIMAL getBigDecimal(.
DOUBLE getDouble(.
FLOAT getDouble(.
INTEGER getInt(.
LONGVARBINARY getBytes(.
LONGVARCHAR getString(.
NUMERIC getBigDecimal(.
OTHER getObject(.
REAL getFloat(.
SMALLINT getShort(.
TIME getTime(.
TIMESTAMP getTimestamp(.
TINYINT getByte(.
VARBINARY getBytes(.
VARCHAR getString(.


Leave a Reply