Can we assign integer value to char in java?



Can we assign integer value to char in java?..

Answer / Karan Mehta

No, in Java it is not possible to assign an integer value to a char variable directly. However, you can convert an integer to its corresponding character using the (char) cast operator.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Explain about exception propagation?

1 Answers  


What is boolean false?

1 Answers  


What is the java idl system?

1 Answers  


What is a class ?

8 Answers  


what are the states associated in the thread? : Java thread

1 Answers  


if we give input as " hi how are you" then the output should be "uoy woh"...it should skip odd words in the input and should reverse even words from the end of string...can anyone help me to write this program in java

1 Answers  


What is the difference between replace and replace all?

1 Answers  


What is java used for on a computer?

1 Answers  


Why we use protected in java?

1 Answers  


Can you override static method in java?

1 Answers  


What is a singleton factory?

1 Answers  


What types of inheritance does Java support?

2 Answers  


Categories