Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code.
The workspace contains two folders by default, where:
src
: the folder to maintain sourceslib
: the folder to maintain dependencies
Meanwhile, the compiled output files will be generated in the bin
folder by default.
If you want to customize the folder structure, open
.vscode/settings.json
and update the related settings there.
The JAVA PROJECTS
view allows you to manage your dependencies. More details can be found here.
/*The meaning of Encapsulation, is to make sure that "sensitive" data is hidden from users. To achieve this, you must:
declare class variables/attributes as private provide public "get" and "set" methods to access and update the value of a private variable.
The get method returns the variable value, and the set method sets the value. */
/Data abstraction is the process of hiding certain details and showing only essential information to the user./ //Abstract class: is a restricted class that cannot be used to create objects
/*When executing Java code, different errors can occur: coding errors made by the programmer, errors due to wrong input, or other unforeseeable things.
When an error occurs, Java will normally stop and generate an error message. The technical term for this is: Java will throw an exception (throw an error).
Then there is an introduction of "try and catch keywords, they come in pairs: */# JavaApp_CelciusToFuhrenheit