Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Java for Beginners: Mastering the Fundamentals of Programming, Schemes and Mind Maps of Computer science

A comprehensive introduction to the java programming language, covering the essential concepts and constructs that every beginner programmer needs to know. It delves into the basics of variables, data types, and operations, guiding readers through the process of understanding and applying these fundamental building blocks of java. The document also explores the importance of flowcharts in planning and visualizing code execution, as well as the principles of data input and output. By the end of this resource, readers will have a solid foundation in the core elements of java programming, empowering them to take the next steps in their journey towards becoming proficient java developers.

Typology: Schemes and Mind Maps

2023/2024

Uploaded on 04/29/2024

mm-fiore
mm-fiore 🇳🇱

1 / 11

Toggle sidebar

Related documents


Partial preview of the text

Download Java for Beginners: Mastering the Fundamentals of Programming and more Schemes and Mind Maps Computer science in PDF only on Docsity!

Java for

Beginners

All the basics knowledge needed for becoming a programmer

Variables

 - Variables are the way the program stores the informations.  These informations can be Input Data, Output Data or a Support Variable that we use to keep data while the program is doing other operations.

Example

10 X Variable X

stores 10

11 Y Variable Y

stores 11

Operatios

 - All basics mathematical operations can be performed in Java(+ - / *).  - Advanced operations can be used adding libraries

Example

 - calculator uses numbers and the operation we want to perform  ‘11’ ‘+’ ‘12’  - The result of the operation  ‘33’

Notice

 - Java is a typed language every variable can have only 1 type, which means that can store only a particular kind of data  Es:  int -> the variable can store only integer numbers (1,2,3 etc)  char -> the variable can store only charcacters (a,b,c,d, etc)

FlowChart Diagram

 - We use a flowchart before starting code so we have a better understanding of the sequence of operation we want the code to perform.

Int x;

Our Flowchart

X is an integer variables and stores 10

Y is an integer variable and stores 12

Output we give the result of x+y as output

Int x= 10;

Int y= 12;

x+y;

Input and Output

 - Data Input is an information (number, character, string, anything) that we give to our code in order to do the operation (operations) we want to perform.  - Data Output is the result of the operation (operations) that were performed by the code.

Example

 - Input for the calculator are numbers and the operation we want to perform  ‘1’ ‘+’ ‘2’  - The output is the result of the operation  ‘3’

Send Input from Keyboard

 Scanner console = new Scanner(System.in); -> lets the data inserted from console go to code  int x = console.nextInt(); -> saves the integer in the variable X that sent by pressing “Enter”