CppBuzz.com
  
Home C C++ Java Python Perl PHP SQL Javascript Linux Forum

You are here : Home » Java » Java Interview Questions on Typecasting

Java Interview Questions on Typecasting - 14 Questions


Question: 1

(A) 123
(B) 1234
(C) 12340
(D) Compilation Error

DiscussOnForum
Beginner typecasting[Posted by: Admin | Chicago, USA]



Question: 2

(A) 1234.34
(B) 1234
(C) .1234.00
(D) NumberFormatException

DiscussOnForum
Beginner typecasting[Posted by: Admin | Chicago, USA]



Question: 3

(A) 1234.00
(B) 1234.34
(C) 1234
(D) Exception

DiscussOnForum
Expert typecasting[Posted by: Admin | Chicago, USA]



Question: 4

(A) Compilation Error
(B) Exception
(C) 10
(D) 1

DiscussOnForum
Beginner typecasting[Posted by: Admin | Chicago, USA]



Question: 5

(A) 10.0
(B) 10
(C) error: loss precision
(D) Exception

DiscussOnForum
Expert typecasting[Posted by: Admin | Chicago, USA]



Question: 6

(A) 10.0f
(B) 10.0
(C) 10
(D) error: no suitable method found for toString(float)

DiscussOnForum
Practitioner typecasting[Posted by: Admin | Chicago, USA]



Question: 7

(A) 10.0f
(B) 10.0
(C) 10
(D) 10.00

DiscussOnForum
Beginner typecasting[Posted by: Admin | Chicago, USA]



Question: 8

(A) 10.0f
(B) 10.0
(C) 10.00
(D) 10.0000

DiscussOnForum
Practitioner typecasting[Posted by: Admin | Chicago, USA]



Question: 9

(A) 10.0000f
(B) 10.0000
(C) 10.00
(D) 10.0

DiscussOnForum
Expert typecasting[Posted by: Admin | Chicago, USA]



Question: 10

(A) 0
(B) 10
(C) 100
(D) Exception

DiscussOnForum
Practitioner typecasting[Posted by: Admin | Chicago, USA]



Question: 11

(A) 10
(B) 10.00
(C) 10.87
(D) NumberFormatException

DiscussOnForum
Expert typecasting[Posted by: Admin | Chicago, USA]



Question: 12

(A) 10.87
(B) 10.00
(C) 10
(D) error:possible loss of precision

DiscussOnForum
Expert typecasting[Posted by: Admin | Chicago, USA]



Question: 13

(A) 10.87
(B) 10.870000
(C) 10.8700
(D) 10.00

DiscussOnForum
Expert typecasting[Posted by: Admin | Chicago, USA]



Question: 14

(A) 99
(B) 67
(C) Unpredictable Value
(D) NumberFormatException

DiscussOnForum
Practitioner typecasting[Posted by: Admin | Chicago, USA]


[Contribute to this Website]


Browse Java Categories

Datatype Variables Operators Decision Making Loops Methods Reference Variables Arrays Classes and Objects Abstract Class Singleton Class Modifiers Inheritance Overriding Polymorphism Abstraction Encapsulation Files and I/O TypeCasting Packages Exceptions Collections Framework Numbers Class Date & Time Regular Expressions Data Structures Interfaces Multithreading Other