Buscar
Estás en modo de exploración. debe iniciar sesión para usar MEMORY

   Inicia sesión para empezar


Por supuesto:

Introduction to Java

» Iniciar este curso
(Practica preguntas similares gratis)
Pregunta:

Type compatibility & Type conversions (1)

Autor: Christian N



Respuesta:

Operands of an expression must be (data) type compatible to each other – each operation (+, *, ...) ultimately requires operands of the same data type. Two types are compatible if they are • equal, or • one can be converted to the other by implicit type conversion (performed autonomously by the compiler). Implicit (automatic) data type conversion (type promotion) • byte → short → int → long → float → double • char → int • All primitive types → String These conversions never cause data loss!


0 / 5  (0 calificaciones)

1 answer(s) in total