SlideShare ist ein Scribd-Unternehmen logo
1 von 6
Downloaden Sie, um offline zu lesen
VARIABLES AND DATA TYPES
Tuğçe ARSLAN
Variables are held in memory in different formats depending on the type they are assigned
to, and these types have different sizes from each other. The software is generally designed to
process data and present the result to the user. However, the user can request data, or oper-
ations can be performed entirely on the values kept in memory. Variables, data are stored in
RAM (Random Access Memory) for a short time.
In real life, data is used for classification. Classification is
usually done according to the Types of Data.
Variables are structures that store temporary information in programming and are deter-
mined by the programmer. Variables form the basic structure of programming, and it is a struc-
ture used in all programming languages. Thanks to the variables, we keep the operations we
do in the program in memory and exploit them where necessary.
Variables have four properties; Data Type, Name, Value, and Address.
In Variables, Data Type, as the name suggests, indicates the type of data to be stored,
which can be numbers, words, and programmatic fields. Each variable has a unique character
from which it is used and called within the program. We assign a value to these variables; our
operating system keeps this variable in memory and sets an address.
Variables in Java have Data Types. These types can be primitive ones defined by default in
Java or non–primitive ones described by the developers themselves. Primitive types always have
value. Non–primitive types can be “null.” While non–primitive types all have the same size, the
size of primitive data types depends on the data type they will receive.
anumak.ai
In Classical Languages, basic Data Types such as integers, fractional numbers, boolean,
void, char, and composite Data Types such as string and array are built–in–types in the pro-
gramming language, each specified by a keyword. Whereas, in Object–Oriented Program-
ming Languages, each type is a class. However, primitive Data Types are used very often when
writing programs. Therefore, Object–Oriented Languages give an exception to such Data
Types. The Java language allows these data types to be used without creating objects belong-
ing to them. This makes it easier to write programs and speeds up.
The Java compiler automatically embeds (wrapping, boxing) each defined primitive data in
the class it belongs to, when necessary. Boxing puts a primitive variable into the category it be-
longs to and turns it into a variable belonging to an object. In other words, it is the conversion
of a primitive type to a reference type. Unboxing is the reverse process: Converting a boxed
variable back to a primitive data type. The java compiler does both things by itself, without the
programmer’s intervention.
Why Data Type?
We may need to handle different Data Types in a program. For example, integers, fraction-
al numbers, characters (letters and other symbols on the keyboard), text (string), logical (bool-
ean) values (true=true, false=false) are the different data types that come to mind first. These
additional data types differ in size (the number of bits they will occupy in memory) and the
operations that can be done. For example, we can do four functions with numbers but not texts.
Therefore, Java and some other languages separate data into types. Defining a variable speci-
fies which type of data it will hold. Thus, it allocates enough space for that variable in the main
memory and allows operations to be performed according to that Data Type.
anumak.ai
What is a Variable?
In a computer program, Variables are the names (identities) given to them to distinguish the
data used in the program from each other. Giving each data a separate name prevents them
from getting confused. It is the same in everyday life.
For compilers, it doesn’t matter whether the names given to the Variables are short or long,
meaningful or meaningless. However, it is appropriate to provide them with meaningful names
so that the source program writer and reader can easily understand what the Variables repre-
sent. Of course, this is not a problem in short programs, even single letter names are given, and
it is primarily convenient. But in extended programs, it is easy to understand and preferable to
name Variables with names that indicate the data they represent.
Technically speaking, a Variable is an address in the main memory
where values of a particular Data Type can be entered.
Variables are tools that carry the raw Data Types of the program. There are no global Vari-
ables in Java. Instead, each Variable is defined in a class or a block in the class. Those de-
scribed in the class become a class members of the class in which it is defined. Those defined
within an inner block within the type become the local Variable of that inner block.
Each Variable is allocated a place in the main memory large enough for the Data Type to
hold that Variable. This place is called the address of the Variable in the main memory. Each
Variable is given a name. Using this name, the Variable can be assigned a value, the set value
can be read, and the assigned value can be changed (updated). Accessing a Variable means
assigning a value to that Variable, reading the set value, and changing the given value at will.
Java is a type–protected language. In other words, the Java language separates the Data
Types to be held by the Variables to be used in the program with strict limits. In this respect,
it is similar to C and C++ languages. Therefore, when declaring a Variable, the Data Type of
that Variable is strictly specified. Then the data assigned to that variable cannot go outside the
selected data type. An exception to this is when, in some cases, the data held by a Variable is
converted to another type.
anumak.ai
ANUMAK & COMPANY
aNumak & Company is a global management consulting firm, an India private company
limited by warranty. It is a company with expertise in creating scalable business models for
different industry verticals. The Company strives to provide solutions through consulting, digital
transformation, and innovative products that solve modern business problems. Offering on–
site and offshore support and unique strategies, aNumak & Company transforms traditional
business models into high–performance, dynamic, and distinctive business enterprises. It brings
insights from core domain experts to deliver the best possible solutions to drive growth. aNumak
& Company and each of its member firms are legally separate and independent entities. For
more detailed information about aNumak & Company and its member companies, please visit
https://www.anumak.com
This material was prepared by aNumak & Company. This material (including any information it
contains) is intended to provide general information on a particular topic(s). This material may
contain information obtained from publicly available information or other third–party sources.
aNumak & Company does not independently verify such sources and is not responsible for any
loss resulting from reliance on information obtained from such sources. aNumak & Company
does not provide any investment, legal, or other professional advice or services through this
material. You should seek specific advice from the relevant specialist(s) for such services.
This material or information is not intended to be considered the sole basis for any decision
that could affect you, your business, or the operations of the company. Before making any
decision or taking any action that could affect your finances or business, you should consult a
professional.
No institution at aNumak & Company can be held responsible for any loss suffered by any
person or institution due to access to, use, or reliance on this material. By using this material or
any information it contains, the user accepts he entirety of this notice and
the terms of use.
©2022 aNumak & Company
anumak.ai
Amith Kumar
Chief Executive Officer,
aNumak & Company
amith@anumak.com
Neha Anush
Chief Operating Officer,
aNumak & Company
neha.anush@anumak.com
Tuǧçe ARSLAN
Chief Content Officer and PR
aNumak & Company
arslan@anumak.in
Cesibel Rodriguez
Chief Branding Officer,
aNumak & Company
cesi@anumak.com
Ricky Devaya
Chief Human Resource Officer – India,
aNumak & Company
ricky@anumak.com
Vilas Khole
Chief Delivery Officer – India,
aNumak & Company
vilas@anumak.com
Karthik Reddy
Chief Sales Officer – UAE,
aNumak & Company
karthik@anumak.in
Iván Muñiz Rothgiesser
Sales Director,
aNumak & Company
ivan@anumak.com
Gino Mori Valenzuela
Client Partner – Retail,
aNumak & Company
gino@anumak.in
Diana Marcela Rios
Client Partner – Retail,
aNumak & Company
diana@anumak.in
aNumak & Company
marketing@anumak.com
Pr@anumak.in - info@anumak.com
Víctor Freundt
Client Partner – Education,
aNumak & Company
victor@anumak.in
Agyemang Mensah Kwadwo
Graphic Designer,
aNumak & Company
agyemang@anumak.in
anumak.ai
CONTACTS CONTRIBUTORS

Weitere ähnliche Inhalte

Ähnlich wie VARIABLES AND DATA TYPES

java handout.doc
java handout.docjava handout.doc
java handout.docSOMOSCO1
 
502 Object Oriented Analysis and Design.pdf
502 Object Oriented Analysis and Design.pdf502 Object Oriented Analysis and Design.pdf
502 Object Oriented Analysis and Design.pdfPradeepPandey506579
 
Java Developer_ The Unsung Hero of Enterprise-Level Software Development (4).pdf
Java Developer_ The Unsung Hero of Enterprise-Level Software Development (4).pdfJava Developer_ The Unsung Hero of Enterprise-Level Software Development (4).pdf
Java Developer_ The Unsung Hero of Enterprise-Level Software Development (4).pdfAnviMartin
 
leewayhertz.com-What role do embeddings play in a ChatGPT-like model.pdf
leewayhertz.com-What role do embeddings play in a ChatGPT-like model.pdfleewayhertz.com-What role do embeddings play in a ChatGPT-like model.pdf
leewayhertz.com-What role do embeddings play in a ChatGPT-like model.pdfrobertsamuel23
 
Advanced Document Management System for Education Industry
Advanced Document Management System for Education IndustryAdvanced Document Management System for Education Industry
Advanced Document Management System for Education IndustryDave Ronak
 
Introduction to Core Java Programming
Introduction to Core Java ProgrammingIntroduction to Core Java Programming
Introduction to Core Java ProgrammingRaveendra R
 
Maintenance of Dynamically vs. Statically typed Languages
Maintenance of Dynamically vs. Statically typed LanguagesMaintenance of Dynamically vs. Statically typed Languages
Maintenance of Dynamically vs. Statically typed LanguagesAmin Bandeali
 
Class notes(week 2) on basic concepts of oop-2
Class notes(week 2) on basic concepts of oop-2Class notes(week 2) on basic concepts of oop-2
Class notes(week 2) on basic concepts of oop-2Kuntal Bhowmick
 
Language design and translation issues
Language design and translation issuesLanguage design and translation issues
Language design and translation issuesSURBHI SAROHA
 
Class notes(week 2) on basic concepts of oop-2
Class notes(week 2) on basic concepts of oop-2Class notes(week 2) on basic concepts of oop-2
Class notes(week 2) on basic concepts of oop-2Kuntal Bhowmick
 
Patton user modeling
Patton user modelingPatton user modeling
Patton user modelingHindu Dharma
 
project on Agile approach
project on Agile approachproject on Agile approach
project on Agile approachPrachi desai
 
Automating and Validating Semantic Annotations.pdf
Automating and Validating Semantic Annotations.pdfAutomating and Validating Semantic Annotations.pdf
Automating and Validating Semantic Annotations.pdfKathryn Patel
 
Criteria for selecting ERP Software Vendors
Criteria for selecting ERP Software VendorsCriteria for selecting ERP Software Vendors
Criteria for selecting ERP Software VendorsJulius Noble Ssekazinga
 
Ibm watson boston meetup may 27 2015
Ibm watson boston meetup may 27 2015Ibm watson boston meetup may 27 2015
Ibm watson boston meetup may 27 2015IBM
 
Crafting Your Customized Legal Mastery: A Guide to Building Your Private LLM
Crafting Your Customized Legal Mastery: A Guide to Building Your Private LLMCrafting Your Customized Legal Mastery: A Guide to Building Your Private LLM
Crafting Your Customized Legal Mastery: A Guide to Building Your Private LLMChristopherTHyatt
 
Veda Semantics - introduction document
Veda Semantics - introduction documentVeda Semantics - introduction document
Veda Semantics - introduction documentrajatkr
 

Ähnlich wie VARIABLES AND DATA TYPES (20)

Flutter.pdf
 Flutter.pdf Flutter.pdf
Flutter.pdf
 
java handout.doc
java handout.docjava handout.doc
java handout.doc
 
502 Object Oriented Analysis and Design.pdf
502 Object Oriented Analysis and Design.pdf502 Object Oriented Analysis and Design.pdf
502 Object Oriented Analysis and Design.pdf
 
Java Developer_ The Unsung Hero of Enterprise-Level Software Development (4).pdf
Java Developer_ The Unsung Hero of Enterprise-Level Software Development (4).pdfJava Developer_ The Unsung Hero of Enterprise-Level Software Development (4).pdf
Java Developer_ The Unsung Hero of Enterprise-Level Software Development (4).pdf
 
leewayhertz.com-What role do embeddings play in a ChatGPT-like model.pdf
leewayhertz.com-What role do embeddings play in a ChatGPT-like model.pdfleewayhertz.com-What role do embeddings play in a ChatGPT-like model.pdf
leewayhertz.com-What role do embeddings play in a ChatGPT-like model.pdf
 
Advanced Document Management System for Education Industry
Advanced Document Management System for Education IndustryAdvanced Document Management System for Education Industry
Advanced Document Management System for Education Industry
 
Introduction to Core Java Programming
Introduction to Core Java ProgrammingIntroduction to Core Java Programming
Introduction to Core Java Programming
 
Maintenance of Dynamically vs. Statically typed Languages
Maintenance of Dynamically vs. Statically typed LanguagesMaintenance of Dynamically vs. Statically typed Languages
Maintenance of Dynamically vs. Statically typed Languages
 
Class notes(week 2) on basic concepts of oop-2
Class notes(week 2) on basic concepts of oop-2Class notes(week 2) on basic concepts of oop-2
Class notes(week 2) on basic concepts of oop-2
 
Language design and translation issues
Language design and translation issuesLanguage design and translation issues
Language design and translation issues
 
Class notes(week 2) on basic concepts of oop-2
Class notes(week 2) on basic concepts of oop-2Class notes(week 2) on basic concepts of oop-2
Class notes(week 2) on basic concepts of oop-2
 
Patton user modeling
Patton user modelingPatton user modeling
Patton user modeling
 
project on Agile approach
project on Agile approachproject on Agile approach
project on Agile approach
 
ICT.docx
 ICT.docx ICT.docx
ICT.docx
 
It project 1
It project 1It project 1
It project 1
 
Automating and Validating Semantic Annotations.pdf
Automating and Validating Semantic Annotations.pdfAutomating and Validating Semantic Annotations.pdf
Automating and Validating Semantic Annotations.pdf
 
Criteria for selecting ERP Software Vendors
Criteria for selecting ERP Software VendorsCriteria for selecting ERP Software Vendors
Criteria for selecting ERP Software Vendors
 
Ibm watson boston meetup may 27 2015
Ibm watson boston meetup may 27 2015Ibm watson boston meetup may 27 2015
Ibm watson boston meetup may 27 2015
 
Crafting Your Customized Legal Mastery: A Guide to Building Your Private LLM
Crafting Your Customized Legal Mastery: A Guide to Building Your Private LLMCrafting Your Customized Legal Mastery: A Guide to Building Your Private LLM
Crafting Your Customized Legal Mastery: A Guide to Building Your Private LLM
 
Veda Semantics - introduction document
Veda Semantics - introduction documentVeda Semantics - introduction document
Veda Semantics - introduction document
 

Mehr von aNumak & Company

The Challenges Of Multi-cloud Management.pdf
The Challenges Of Multi-cloud Management.pdfThe Challenges Of Multi-cloud Management.pdf
The Challenges Of Multi-cloud Management.pdfaNumak & Company
 
5 Pillars Of Effective Data Management In Modern Data Systems.pdf
5 Pillars Of Effective Data Management In Modern Data Systems.pdf5 Pillars Of Effective Data Management In Modern Data Systems.pdf
5 Pillars Of Effective Data Management In Modern Data Systems.pdfaNumak & Company
 
How CFOs Are Helping Corporations Integrate ESG Into Their Business Strategie...
How CFOs Are Helping Corporations Integrate ESG Into Their Business Strategie...How CFOs Are Helping Corporations Integrate ESG Into Their Business Strategie...
How CFOs Are Helping Corporations Integrate ESG Into Their Business Strategie...aNumak & Company
 
Impact Of Industry 4.0 Technologies On Business Development And Management.pdf
Impact Of Industry 4.0 Technologies On Business Development And Management.pdfImpact Of Industry 4.0 Technologies On Business Development And Management.pdf
Impact Of Industry 4.0 Technologies On Business Development And Management.pdfaNumak & Company
 
The Future Of Smart Technology And Its Effect On Business performance.pdf
The Future Of Smart Technology And Its Effect On Business performance.pdfThe Future Of Smart Technology And Its Effect On Business performance.pdf
The Future Of Smart Technology And Its Effect On Business performance.pdfaNumak & Company
 
The effects of Industry 5.pdf
The effects of Industry 5.pdfThe effects of Industry 5.pdf
The effects of Industry 5.pdfaNumak & Company
 
Importance Of The Dignity Of Compliance Risk In Organizations.pdf
Importance Of The Dignity Of Compliance Risk In Organizations.pdfImportance Of The Dignity Of Compliance Risk In Organizations.pdf
Importance Of The Dignity Of Compliance Risk In Organizations.pdfaNumak & Company
 
NEXT GENERATION SOFTWARE DEVELOPMENT.pdf
NEXT GENERATION SOFTWARE DEVELOPMENT.pdfNEXT GENERATION SOFTWARE DEVELOPMENT.pdf
NEXT GENERATION SOFTWARE DEVELOPMENT.pdfaNumak & Company
 
Getting Through the Fear Factor When Hiring Tech Talents.pdf
Getting Through the Fear Factor When Hiring Tech Talents.pdfGetting Through the Fear Factor When Hiring Tech Talents.pdf
Getting Through the Fear Factor When Hiring Tech Talents.pdfaNumak & Company
 
Rebuilding social capital and improving business performance.pdf
Rebuilding social capital and improving business performance.pdfRebuilding social capital and improving business performance.pdf
Rebuilding social capital and improving business performance.pdfaNumak & Company
 
How Advanced Connectivity__ affects the prospects of the market trends today.pdf
How Advanced Connectivity__ affects the prospects of the market trends today.pdfHow Advanced Connectivity__ affects the prospects of the market trends today.pdf
How Advanced Connectivity__ affects the prospects of the market trends today.pdfaNumak & Company
 
How Praise And recognition affect bottom line.pdf
How Praise And recognition affect bottom line.pdfHow Praise And recognition affect bottom line.pdf
How Praise And recognition affect bottom line.pdfaNumak & Company
 
DANGERS OF TOXIC WORKPLACE.pdf
DANGERS OF TOXIC WORKPLACE.pdfDANGERS OF TOXIC WORKPLACE.pdf
DANGERS OF TOXIC WORKPLACE.pdfaNumak & Company
 
How To Build Mentally Resilience Workforce for An Organization.pdf
How To Build Mentally Resilience Workforce for An Organization.pdfHow To Build Mentally Resilience Workforce for An Organization.pdf
How To Build Mentally Resilience Workforce for An Organization.pdfaNumak & Company
 
FUTURE OF RETAIL WILL LOOK LIKE WHAT'S HAPPENED IN THE MUSIC INDUSTRY.pdf
FUTURE OF RETAIL WILL LOOK LIKE WHAT'S HAPPENED IN THE MUSIC INDUSTRY.pdfFUTURE OF RETAIL WILL LOOK LIKE WHAT'S HAPPENED IN THE MUSIC INDUSTRY.pdf
FUTURE OF RETAIL WILL LOOK LIKE WHAT'S HAPPENED IN THE MUSIC INDUSTRY.pdfaNumak & Company
 
Localization of data privacy laws creates opportunities for competition.pdf
Localization of data privacy laws creates opportunities for competition.pdfLocalization of data privacy laws creates opportunities for competition.pdf
Localization of data privacy laws creates opportunities for competition.pdfaNumak & Company
 
How a Revamped Data Analytics Approach Can Mitigate Healthcare Disparities.pdf
How a Revamped Data Analytics Approach Can Mitigate Healthcare Disparities.pdfHow a Revamped Data Analytics Approach Can Mitigate Healthcare Disparities.pdf
How a Revamped Data Analytics Approach Can Mitigate Healthcare Disparities.pdfaNumak & Company
 
Effects of High Inflation on Private Equity Performance in Business.pdf
Effects of High Inflation on Private Equity Performance in Business.pdfEffects of High Inflation on Private Equity Performance in Business.pdf
Effects of High Inflation on Private Equity Performance in Business.pdfaNumak & Company
 
How Low-code Can Help Businesses Automate IoT In Their Business.pdf
How Low-code Can Help Businesses Automate IoT In Their Business.pdfHow Low-code Can Help Businesses Automate IoT In Their Business.pdf
How Low-code Can Help Businesses Automate IoT In Their Business.pdfaNumak & Company
 
How the CEO's visionary leadership can tip the scales in favor of success in ...
How the CEO's visionary leadership can tip the scales in favor of success in ...How the CEO's visionary leadership can tip the scales in favor of success in ...
How the CEO's visionary leadership can tip the scales in favor of success in ...aNumak & Company
 

Mehr von aNumak & Company (20)

The Challenges Of Multi-cloud Management.pdf
The Challenges Of Multi-cloud Management.pdfThe Challenges Of Multi-cloud Management.pdf
The Challenges Of Multi-cloud Management.pdf
 
5 Pillars Of Effective Data Management In Modern Data Systems.pdf
5 Pillars Of Effective Data Management In Modern Data Systems.pdf5 Pillars Of Effective Data Management In Modern Data Systems.pdf
5 Pillars Of Effective Data Management In Modern Data Systems.pdf
 
How CFOs Are Helping Corporations Integrate ESG Into Their Business Strategie...
How CFOs Are Helping Corporations Integrate ESG Into Their Business Strategie...How CFOs Are Helping Corporations Integrate ESG Into Their Business Strategie...
How CFOs Are Helping Corporations Integrate ESG Into Their Business Strategie...
 
Impact Of Industry 4.0 Technologies On Business Development And Management.pdf
Impact Of Industry 4.0 Technologies On Business Development And Management.pdfImpact Of Industry 4.0 Technologies On Business Development And Management.pdf
Impact Of Industry 4.0 Technologies On Business Development And Management.pdf
 
The Future Of Smart Technology And Its Effect On Business performance.pdf
The Future Of Smart Technology And Its Effect On Business performance.pdfThe Future Of Smart Technology And Its Effect On Business performance.pdf
The Future Of Smart Technology And Its Effect On Business performance.pdf
 
The effects of Industry 5.pdf
The effects of Industry 5.pdfThe effects of Industry 5.pdf
The effects of Industry 5.pdf
 
Importance Of The Dignity Of Compliance Risk In Organizations.pdf
Importance Of The Dignity Of Compliance Risk In Organizations.pdfImportance Of The Dignity Of Compliance Risk In Organizations.pdf
Importance Of The Dignity Of Compliance Risk In Organizations.pdf
 
NEXT GENERATION SOFTWARE DEVELOPMENT.pdf
NEXT GENERATION SOFTWARE DEVELOPMENT.pdfNEXT GENERATION SOFTWARE DEVELOPMENT.pdf
NEXT GENERATION SOFTWARE DEVELOPMENT.pdf
 
Getting Through the Fear Factor When Hiring Tech Talents.pdf
Getting Through the Fear Factor When Hiring Tech Talents.pdfGetting Through the Fear Factor When Hiring Tech Talents.pdf
Getting Through the Fear Factor When Hiring Tech Talents.pdf
 
Rebuilding social capital and improving business performance.pdf
Rebuilding social capital and improving business performance.pdfRebuilding social capital and improving business performance.pdf
Rebuilding social capital and improving business performance.pdf
 
How Advanced Connectivity__ affects the prospects of the market trends today.pdf
How Advanced Connectivity__ affects the prospects of the market trends today.pdfHow Advanced Connectivity__ affects the prospects of the market trends today.pdf
How Advanced Connectivity__ affects the prospects of the market trends today.pdf
 
How Praise And recognition affect bottom line.pdf
How Praise And recognition affect bottom line.pdfHow Praise And recognition affect bottom line.pdf
How Praise And recognition affect bottom line.pdf
 
DANGERS OF TOXIC WORKPLACE.pdf
DANGERS OF TOXIC WORKPLACE.pdfDANGERS OF TOXIC WORKPLACE.pdf
DANGERS OF TOXIC WORKPLACE.pdf
 
How To Build Mentally Resilience Workforce for An Organization.pdf
How To Build Mentally Resilience Workforce for An Organization.pdfHow To Build Mentally Resilience Workforce for An Organization.pdf
How To Build Mentally Resilience Workforce for An Organization.pdf
 
FUTURE OF RETAIL WILL LOOK LIKE WHAT'S HAPPENED IN THE MUSIC INDUSTRY.pdf
FUTURE OF RETAIL WILL LOOK LIKE WHAT'S HAPPENED IN THE MUSIC INDUSTRY.pdfFUTURE OF RETAIL WILL LOOK LIKE WHAT'S HAPPENED IN THE MUSIC INDUSTRY.pdf
FUTURE OF RETAIL WILL LOOK LIKE WHAT'S HAPPENED IN THE MUSIC INDUSTRY.pdf
 
Localization of data privacy laws creates opportunities for competition.pdf
Localization of data privacy laws creates opportunities for competition.pdfLocalization of data privacy laws creates opportunities for competition.pdf
Localization of data privacy laws creates opportunities for competition.pdf
 
How a Revamped Data Analytics Approach Can Mitigate Healthcare Disparities.pdf
How a Revamped Data Analytics Approach Can Mitigate Healthcare Disparities.pdfHow a Revamped Data Analytics Approach Can Mitigate Healthcare Disparities.pdf
How a Revamped Data Analytics Approach Can Mitigate Healthcare Disparities.pdf
 
Effects of High Inflation on Private Equity Performance in Business.pdf
Effects of High Inflation on Private Equity Performance in Business.pdfEffects of High Inflation on Private Equity Performance in Business.pdf
Effects of High Inflation on Private Equity Performance in Business.pdf
 
How Low-code Can Help Businesses Automate IoT In Their Business.pdf
How Low-code Can Help Businesses Automate IoT In Their Business.pdfHow Low-code Can Help Businesses Automate IoT In Their Business.pdf
How Low-code Can Help Businesses Automate IoT In Their Business.pdf
 
How the CEO's visionary leadership can tip the scales in favor of success in ...
How the CEO's visionary leadership can tip the scales in favor of success in ...How the CEO's visionary leadership can tip the scales in favor of success in ...
How the CEO's visionary leadership can tip the scales in favor of success in ...
 

Kürzlich hochgeladen

04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationshipsccctableauusergroup
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxolyaivanovalion
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystSamantha Rae Coolbeth
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFxolyaivanovalion
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionfulawalesam
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubaihf8803863
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSAishani27
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxolyaivanovalion
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...Suhani Kapoor
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxolyaivanovalion
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxolyaivanovalion
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxJohnnyPlasten
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusTimothy Spann
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 

Kürzlich hochgeladen (20)

04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptx
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data Analyst
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFx
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interaction
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICS
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptx
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptx
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and Milvus
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 

VARIABLES AND DATA TYPES

  • 1. VARIABLES AND DATA TYPES Tuğçe ARSLAN
  • 2. Variables are held in memory in different formats depending on the type they are assigned to, and these types have different sizes from each other. The software is generally designed to process data and present the result to the user. However, the user can request data, or oper- ations can be performed entirely on the values kept in memory. Variables, data are stored in RAM (Random Access Memory) for a short time. In real life, data is used for classification. Classification is usually done according to the Types of Data. Variables are structures that store temporary information in programming and are deter- mined by the programmer. Variables form the basic structure of programming, and it is a struc- ture used in all programming languages. Thanks to the variables, we keep the operations we do in the program in memory and exploit them where necessary. Variables have four properties; Data Type, Name, Value, and Address. In Variables, Data Type, as the name suggests, indicates the type of data to be stored, which can be numbers, words, and programmatic fields. Each variable has a unique character from which it is used and called within the program. We assign a value to these variables; our operating system keeps this variable in memory and sets an address. Variables in Java have Data Types. These types can be primitive ones defined by default in Java or non–primitive ones described by the developers themselves. Primitive types always have value. Non–primitive types can be “null.” While non–primitive types all have the same size, the size of primitive data types depends on the data type they will receive. anumak.ai
  • 3. In Classical Languages, basic Data Types such as integers, fractional numbers, boolean, void, char, and composite Data Types such as string and array are built–in–types in the pro- gramming language, each specified by a keyword. Whereas, in Object–Oriented Program- ming Languages, each type is a class. However, primitive Data Types are used very often when writing programs. Therefore, Object–Oriented Languages give an exception to such Data Types. The Java language allows these data types to be used without creating objects belong- ing to them. This makes it easier to write programs and speeds up. The Java compiler automatically embeds (wrapping, boxing) each defined primitive data in the class it belongs to, when necessary. Boxing puts a primitive variable into the category it be- longs to and turns it into a variable belonging to an object. In other words, it is the conversion of a primitive type to a reference type. Unboxing is the reverse process: Converting a boxed variable back to a primitive data type. The java compiler does both things by itself, without the programmer’s intervention. Why Data Type? We may need to handle different Data Types in a program. For example, integers, fraction- al numbers, characters (letters and other symbols on the keyboard), text (string), logical (bool- ean) values (true=true, false=false) are the different data types that come to mind first. These additional data types differ in size (the number of bits they will occupy in memory) and the operations that can be done. For example, we can do four functions with numbers but not texts. Therefore, Java and some other languages separate data into types. Defining a variable speci- fies which type of data it will hold. Thus, it allocates enough space for that variable in the main memory and allows operations to be performed according to that Data Type. anumak.ai
  • 4. What is a Variable? In a computer program, Variables are the names (identities) given to them to distinguish the data used in the program from each other. Giving each data a separate name prevents them from getting confused. It is the same in everyday life. For compilers, it doesn’t matter whether the names given to the Variables are short or long, meaningful or meaningless. However, it is appropriate to provide them with meaningful names so that the source program writer and reader can easily understand what the Variables repre- sent. Of course, this is not a problem in short programs, even single letter names are given, and it is primarily convenient. But in extended programs, it is easy to understand and preferable to name Variables with names that indicate the data they represent. Technically speaking, a Variable is an address in the main memory where values of a particular Data Type can be entered. Variables are tools that carry the raw Data Types of the program. There are no global Vari- ables in Java. Instead, each Variable is defined in a class or a block in the class. Those de- scribed in the class become a class members of the class in which it is defined. Those defined within an inner block within the type become the local Variable of that inner block. Each Variable is allocated a place in the main memory large enough for the Data Type to hold that Variable. This place is called the address of the Variable in the main memory. Each Variable is given a name. Using this name, the Variable can be assigned a value, the set value can be read, and the assigned value can be changed (updated). Accessing a Variable means assigning a value to that Variable, reading the set value, and changing the given value at will. Java is a type–protected language. In other words, the Java language separates the Data Types to be held by the Variables to be used in the program with strict limits. In this respect, it is similar to C and C++ languages. Therefore, when declaring a Variable, the Data Type of that Variable is strictly specified. Then the data assigned to that variable cannot go outside the selected data type. An exception to this is when, in some cases, the data held by a Variable is converted to another type. anumak.ai
  • 5. ANUMAK & COMPANY aNumak & Company is a global management consulting firm, an India private company limited by warranty. It is a company with expertise in creating scalable business models for different industry verticals. The Company strives to provide solutions through consulting, digital transformation, and innovative products that solve modern business problems. Offering on– site and offshore support and unique strategies, aNumak & Company transforms traditional business models into high–performance, dynamic, and distinctive business enterprises. It brings insights from core domain experts to deliver the best possible solutions to drive growth. aNumak & Company and each of its member firms are legally separate and independent entities. For more detailed information about aNumak & Company and its member companies, please visit https://www.anumak.com This material was prepared by aNumak & Company. This material (including any information it contains) is intended to provide general information on a particular topic(s). This material may contain information obtained from publicly available information or other third–party sources. aNumak & Company does not independently verify such sources and is not responsible for any loss resulting from reliance on information obtained from such sources. aNumak & Company does not provide any investment, legal, or other professional advice or services through this material. You should seek specific advice from the relevant specialist(s) for such services. This material or information is not intended to be considered the sole basis for any decision that could affect you, your business, or the operations of the company. Before making any decision or taking any action that could affect your finances or business, you should consult a professional. No institution at aNumak & Company can be held responsible for any loss suffered by any person or institution due to access to, use, or reliance on this material. By using this material or any information it contains, the user accepts he entirety of this notice and the terms of use. ©2022 aNumak & Company anumak.ai
  • 6. Amith Kumar Chief Executive Officer, aNumak & Company amith@anumak.com Neha Anush Chief Operating Officer, aNumak & Company neha.anush@anumak.com Tuǧçe ARSLAN Chief Content Officer and PR aNumak & Company arslan@anumak.in Cesibel Rodriguez Chief Branding Officer, aNumak & Company cesi@anumak.com Ricky Devaya Chief Human Resource Officer – India, aNumak & Company ricky@anumak.com Vilas Khole Chief Delivery Officer – India, aNumak & Company vilas@anumak.com Karthik Reddy Chief Sales Officer – UAE, aNumak & Company karthik@anumak.in Iván Muñiz Rothgiesser Sales Director, aNumak & Company ivan@anumak.com Gino Mori Valenzuela Client Partner – Retail, aNumak & Company gino@anumak.in Diana Marcela Rios Client Partner – Retail, aNumak & Company diana@anumak.in aNumak & Company marketing@anumak.com Pr@anumak.in - info@anumak.com Víctor Freundt Client Partner – Education, aNumak & Company victor@anumak.in Agyemang Mensah Kwadwo Graphic Designer, aNumak & Company agyemang@anumak.in anumak.ai CONTACTS CONTRIBUTORS