Skip to content

Instantly share code, notes, and snippets.

@singhrahuldps
Created April 29, 2020 13:09
Show Gist options
  • Select an option

  • Save singhrahuldps/9f4d22aea9157635da234d41438d26ad to your computer and use it in GitHub Desktop.

Select an option

Save singhrahuldps/9f4d22aea9157635da234d41438d26ad to your computer and use it in GitHub Desktop.
// Code to show different primitive data types in Java
boolean isStudent = true;
short age = 22;
long stipend = 50000;
char section = 'D';
System.out.printf("The details are: %b, %d, %d %c", isStudent, age, stipend, section);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment