- Java 9 Programming By Example
- Peter Verhas
- 117字
- 2021-07-02 23:37:33
Variables
In Java, just like in almost any programming language, we use variables. The variables in Java are typed. It means that a variable can hold a value of a single type. It is not possible for a variable to hold an int type at some point in the program and later a String type. When variables are declared, their type is written in front of the variable name.
Variables also have visibility scope. Local variables in methods can only be used inside the block in which they are defined. A variable can be used inside methods or they can belong to a class or an object. To differentiate the two, we usually call these variables fields.
推薦閱讀
- Android和PHP開發最佳實踐(第2版)
- Instant 960 Grid System
- Hands-On Microservices with Kotlin
- 小程序開發原理與實戰
- Python數據分析從0到1
- 深度學習:Java語言實現
- Python深度學習:模型、方法與實現
- Kivy Cookbook
- C# Multithreaded and Parallel Programming
- Creating Data Stories with Tableau Public
- QGIS Python Programming Cookbook(Second Edition)
- Getting Started with Python
- MongoDB Cookbook
- ASP.NET Core 2 High Performance(Second Edition)
- SOA Patterns with BizTalk Server 2013 and Microsoft Azure(Second Edition)