Ask Question

Know when the double, int, String, and char data types are best used. Example: I would store a social security number in a string because the social can contain dashes and it is only used for displaying not for a mathematical equation.

+1
Answers (1)
  1. 31 October, 11:46
    0
    A double is best used for numbers that are real, as in they have a decimal. Int is best used for numbers that are whole, as in no decimal. Strings are best used, as in the example you gave, when you have to represent a piece of information that isn't strictly numbers
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Know when the double, int, String, and char data types are best used. Example: I would store a social security number in a string because ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers