Java Type Casting Interview Question  Quiz

Java Type Casting

Java Type Casting Interview Question  : 

Java-type distribution Typing is after you assign the quantity of 1 kind of knowledge to a different kind. In Java, there square measure 2 styles of streaming: Expand stream (by default) – converts little kind to larger kind size Decreasing Stream (manually) – converts giant kind into smaller size double -> float -> long -> int -> char -> short -> computer memory unit Type of Extension in Imitation Reducing the kind of Imitation Type of Extension in Imitation

1
Created on By wefru

Type Casting

TEST YOUR  SKILLS

1 / 10

An expression is involving byte, int, and literal numbers is promoted to which of these?

2 / 10

Type Casting in Java usually refers to ___________?

3 / 10

Explicit Type conversion in Java refers to__________?

4 / 10

Implicit Type Conversion in Java called

5 / 10

What is output of following code

public class Myclass

{

public static void main(String args[]{

int myInt = 9;

double myDouble -myInt;

System.out.println(myInt);

System.out.println(myDouble);

}

}

 

6 / 10

Which of these is necessary condition for automatic type conversion in Java?

7 / 10

What is the output of following Code?

class char_increment

{

public static void main(String[] args)

{

char c1='D';

char c2=84;

c2++;

c1++;

System.out.println(c1 + " " +c2)

}

}

8 / 10

What will be the output of following program?

Class  c

{

public void main (String args[])

{

System.out.println("Hello" + Args[0]);

9 / 10

What will be the output of the following code?

int a=9;

float b=a/2;

Syatem.out.printLn(b);

10 / 10

Type Casting means ?

Your score is

The average score is 20%

0%

Government Job Recruitment 2021

Leave a Reply