Skip to content
/ ex2 Public
forked from cards4j/ex2

example for primitive wrapper with operator

Notifications You must be signed in to change notification settings

cards4pros/ex2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

ex2: product of integer primitive and reference types compiles and runs

What is the result of compiling and running this code using Java 17?

01 public class Ex1  {
02    public static void main(String[] args) {
03        Integer a = Integer.valueOf(7);
04        int c = a * 5;
05        System.out.println(c);
06    }
07 }

Result:

35

Integer reference type variable a multiplied by primitive integer literal 5 is stored in primitive integer variable c and sent to the console as the product, 35.

About

example for primitive wrapper with operator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%