Skip to content

Instantly share code, notes, and snippets.

@madevelopers
Created June 25, 2015 10:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save madevelopers/65984271841bdf61e0a9 to your computer and use it in GitHub Desktop.
Save madevelopers/65984271841bdf61e0a9 to your computer and use it in GitHub Desktop.
How to typecast in Java #java #flashcard

The syntax for typecasting is to put the name of the type in parentheses and use it as an operator.

Example:

double pi = 3.14159;
int x = (int) pi;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment