Answer: assignment between byte and short : Questions « Type Casting « SCJP

Home
SCJP
1.Java Source And Data Type
2.Operators
3.Modifiers
4.Type Casting
5.Statements
6.Object Oriented
7.Thread
8.Utility Classes
9.File
SCJP » Type Casting » Questions 
4.5.8.Answer: assignment between byte and short
yes


The assignment in the code is widening conversions.
4.5.Questions
4.5.1.Only primitives are converted automatically (True/False)
4.5.2.Answer: conversion and primitives
4.5.3.Casting of numeric types may require a runtime check (True/False)
4.5.4.Answer: casting and runtime checking
4.5.5.Is the following code compilable(short and byte type assignment)?
4.5.6.Answer: short and byte type assignment
4.5.7.Is the following code compilable(assignment between byte and short)?
4.5.8.Answer: assignment between byte and short
4.5.9.Will the following code compile(byte type value claculation)?
4.5.10.Answer: byte type value claculation
4.5.11.What is the output(int,string mehtod overloading)?
4.5.12.Answer: int,string mehtod overloading
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.