SlideShare a Scribd company logo
Welcome to Ducat India
Language | IndustrialTraining | Digital Marketing |WebTechnology |
Testing+ | Database | Networking | Mobile Application | ERP | Graphic | Big
Data | Cloud Computing
Apply Now
Call us:
70-70-90-50-90
Basic Syntax
About Java programs, it is paramount to remember the accompanying points.
Class Names –
For all class names, the first letter ought to be in Upper Case. On the off chance that few words are
utilized to structure the name of the class, every internal word’s first letter ought to be in UpperCase.
For example, a common class name is as follows:
class Sample class
Case Sensitivity –
Java is case sensitive, which implies that the identifier Hi and hi would have distinctive
importance in JAVA
Method Names –
All system names ought, to begin with, a Lower Case letter. If a few words are utilized to structure the
name of the method, then every internal word’s first letter ought to be in Upper Case. An example of
this convention is following:
public void mysamplemethod ()
Filename –
The name of the system record ought to precisely match the class name. At the point when you are
saving the file, you ought to keep it utilizing the class name. Remember Java is case touchy and affix
“.java” to the end of the name. If the document name and the class name don’t match your system
won’t assemble.
Consider the example of a class name Sample. In this case, you must name the file as
sample.java.
public static void main(string args[])
Java system handling begins from the main() function, which is a required piece of each
JAVA program.
Java Keywords
Keywords or we can say reserved words in Java. As a rule, these words
cannot be used as names for variables or constants.
List of Java keywords
• abstract
• break
• boolean
• case
• byte
• char
• catch
• const
• class
• default
• continue
• double
• do
• enum
• else
• final
• extends
• float
• finally
• goto
• for
• implements
• if
• instance of
• import
• int
• long
• interface
• new
• native
• private
• package
• protected
• return
• public
• static
• short
• super
• strictfp
• synchronized
• switch
• throw
• this
• transient
• throws
• while
• try
• volatile
• void
Comments in Java
Just as in the case of C++ and C, Java supports two types of comments, namely, single-line
comments and multi-line comments.The syntax for these types of comments are as follows:
Single line comment:
//
Multiple line comment:
/**/
The Java compiler simply ignores all characters that exist in the comments region.
Using Blank Lines:
Any line that is only composed of whitespace characters or comments is considered a blank
line.These lines are just ignored by the compiler and are not included in the executable.
Inheritance:
Java supports inheritance. In other words, it is possible to derive one class from another class in
this programming language. For instance, if you need to create a new class, which is an extension
of an existing class, then you can derive this new class from an existing class. This allows the new
class to access the elements already implemented in the existing class. In this case, the new class is
called the derived class, and the current class is referred to as the superclass.
Interfaces:
As mentioned previously, Java is all about the interaction between objects. How different objects
communicate with each other is defined in what is called an ‘interface.’ Moreover, interfaces are
also an essential aspect of the inheritance feature of java. As part of an interface, the methods that
can be used by a derived or sub-class are declared. However, all the methods declared as usable for
the subclass must be implemented in the subclass.
ThankYou
Call us on: 70-70-90-50-90 || www.ducatindia.com

More Related Content

What's hot (15)

PPTX
Packages and Interfaces
AkashDas112
 
PPT
Introduction
richsoden
 
DOCX
Mit103 object oriented programming
smumbahelp
 
PPTX
Polymorphism
Nuha Noor
 
PPSX
Java Object Oriented Programming
University of Potsdam
 
PPTX
Packages
Nuha Noor
 
DOCX
Class notes(week 7) on packages
Kuntal Bhowmick
 
DOCX
Mi0041 java and web design
smumbahelp
 
PPTX
Basic online java course - Brainsmartlabs
brainsmartlabsedu
 
DOCX
Mi0041 java and web design
smumbahelp
 
PPT
GTU Guidelines for Project on JAVA
TOPS Technologies
 
PDF
Java packages
Jeffrey Quevedo
 
PDF
What are Generics in Java | Java Generics Tutorial | Edureka
Edureka!
 
PDF
Basic Java Programming
Math-Circle
 
PPTX
Coding conventions
Thitipong Jampajeen
 
Packages and Interfaces
AkashDas112
 
Introduction
richsoden
 
Mit103 object oriented programming
smumbahelp
 
Polymorphism
Nuha Noor
 
Java Object Oriented Programming
University of Potsdam
 
Packages
Nuha Noor
 
Class notes(week 7) on packages
Kuntal Bhowmick
 
Mi0041 java and web design
smumbahelp
 
Basic online java course - Brainsmartlabs
brainsmartlabsedu
 
Mi0041 java and web design
smumbahelp
 
GTU Guidelines for Project on JAVA
TOPS Technologies
 
Java packages
Jeffrey Quevedo
 
What are Generics in Java | Java Generics Tutorial | Edureka
Edureka!
 
Basic Java Programming
Math-Circle
 
Coding conventions
Thitipong Jampajeen
 

Similar to Basic syntax (20)

PPTX
Suga java training_with_footer
Sugavanam Natarajan
 
PPTX
Java syntax-and-grammars-oct8
MISSIASABTAL1
 
DOCX
Viva file
anupamasingh87
 
PPTX
Internet and Web Technology (CLASS-15) [JAVA Basics] | NIC/NIELIT Web Technol...
Ayes Chinmay
 
PPTX
Java basics
sagsharma
 
PPTX
Basics of Java
Sherihan Anver
 
PDF
java
Kunal Sunesara
 
PPTX
Basics of java 2
Raghu nath
 
PPTX
Android Training (Java Review)
Khaled Anaqwa
 
PDF
Java Interview Questions for 10+ Year Experienced PDF By ScholarHat
Scholarhat
 
PPTX
OCA Java SE 8 Exam Chapter 1 Java Building Blocks
İbrahim Kürce
 
PPT
Classes and Objects
vmadan89
 
PPTX
Java_Roadmap.pptx
ssuser814cf2
 
PPTX
Core Java
Priyanka Pradhan
 
PDF
Java 06
Loida Igama
 
DOCX
Java mcq
avinash9821
 
PPTX
INDUMATHY- UNIT 1 cs3391 oops introduction to oop and java.pptx
Indu65
 
PDF
Object Oriented Principles
Sujit Majety
 
PPTX
Abstraction encapsulation inheritance polymorphism
PriyadharshiniG41
 
PDF
Bt0074 oops with java2
Techglyphs
 
Suga java training_with_footer
Sugavanam Natarajan
 
Java syntax-and-grammars-oct8
MISSIASABTAL1
 
Viva file
anupamasingh87
 
Internet and Web Technology (CLASS-15) [JAVA Basics] | NIC/NIELIT Web Technol...
Ayes Chinmay
 
Java basics
sagsharma
 
Basics of Java
Sherihan Anver
 
Basics of java 2
Raghu nath
 
Android Training (Java Review)
Khaled Anaqwa
 
Java Interview Questions for 10+ Year Experienced PDF By ScholarHat
Scholarhat
 
OCA Java SE 8 Exam Chapter 1 Java Building Blocks
İbrahim Kürce
 
Classes and Objects
vmadan89
 
Java_Roadmap.pptx
ssuser814cf2
 
Core Java
Priyanka Pradhan
 
Java 06
Loida Igama
 
Java mcq
avinash9821
 
INDUMATHY- UNIT 1 cs3391 oops introduction to oop and java.pptx
Indu65
 
Object Oriented Principles
Sujit Majety
 
Abstraction encapsulation inheritance polymorphism
PriyadharshiniG41
 
Bt0074 oops with java2
Techglyphs
 
Ad

More from Ducat India (20)

PPTX
Join MCSA Server 2016 And 2019 Course In Noida
Ducat India
 
PPTX
Apply now for dot net training classes in Noida
Ducat India
 
PPTX
Apply now for linux training classes in noida
Ducat India
 
PPTX
Apply Now for DevOps Training Classes in Noida
Ducat India
 
PPTX
Apply Now for AutoCAD Training Course in Noida
Ducat India
 
PPTX
Amazon Elastic Load Balancing
Ducat India
 
PPTX
AWS Relation Database Services
Ducat India
 
PPTX
Microsoft Dynamics CRM – Web Resources
Ducat India
 
PPTX
Field Types
Ducat India
 
PPTX
Sprint in jira
Ducat India
 
PPTX
JIRA Versions
Ducat India
 
PPTX
Kanban Board in Jira
Ducat India
 
PPTX
Test Report Preparation
Ducat India
 
PPTX
What is Text Analysis?
Ducat India
 
PPTX
Data Science Using Scikit-Learn
Ducat India
 
PPTX
Struts 2 – Database Access
Ducat India
 
PPTX
Struts 2 – Interceptors
Ducat India
 
PPTX
Struts 2 – Architecture
Ducat India
 
PPTX
Hibernate 5 – merge() Example
Ducat India
 
PPTX
Hibernate Object States – Transient,Persistent and Detached
Ducat India
 
Join MCSA Server 2016 And 2019 Course In Noida
Ducat India
 
Apply now for dot net training classes in Noida
Ducat India
 
Apply now for linux training classes in noida
Ducat India
 
Apply Now for DevOps Training Classes in Noida
Ducat India
 
Apply Now for AutoCAD Training Course in Noida
Ducat India
 
Amazon Elastic Load Balancing
Ducat India
 
AWS Relation Database Services
Ducat India
 
Microsoft Dynamics CRM – Web Resources
Ducat India
 
Field Types
Ducat India
 
Sprint in jira
Ducat India
 
JIRA Versions
Ducat India
 
Kanban Board in Jira
Ducat India
 
Test Report Preparation
Ducat India
 
What is Text Analysis?
Ducat India
 
Data Science Using Scikit-Learn
Ducat India
 
Struts 2 – Database Access
Ducat India
 
Struts 2 – Interceptors
Ducat India
 
Struts 2 – Architecture
Ducat India
 
Hibernate 5 – merge() Example
Ducat India
 
Hibernate Object States – Transient,Persistent and Detached
Ducat India
 
Ad

Recently uploaded (20)

PDF
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PDF
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
PDF
community health nursing question paper 2.pdf
Prince kumar
 
PDF
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
PPT
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
PDF
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
PPTX
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
PDF
SSHS-2025-PKLP_Quarter-1-Dr.-Kerby-Alvarez.pdf
AishahSangcopan1
 
PDF
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
PDF
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
PPTX
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
PDF
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PDF
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PDF
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
PPTX
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
community health nursing question paper 2.pdf
Prince kumar
 
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
SSHS-2025-PKLP_Quarter-1-Dr.-Kerby-Alvarez.pdf
AishahSangcopan1
 
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
LAW OF CONTRACT (5 YEAR LLB & UNITARY LLB )- MODULE - 1.& 2 - LEARN THROUGH P...
APARNA T SHAIL KUMAR
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 

Basic syntax

  • 1. Welcome to Ducat India Language | IndustrialTraining | Digital Marketing |WebTechnology | Testing+ | Database | Networking | Mobile Application | ERP | Graphic | Big Data | Cloud Computing Apply Now Call us: 70-70-90-50-90
  • 2. Basic Syntax About Java programs, it is paramount to remember the accompanying points. Class Names – For all class names, the first letter ought to be in Upper Case. On the off chance that few words are utilized to structure the name of the class, every internal word’s first letter ought to be in UpperCase. For example, a common class name is as follows: class Sample class Case Sensitivity – Java is case sensitive, which implies that the identifier Hi and hi would have distinctive importance in JAVA
  • 3. Method Names – All system names ought, to begin with, a Lower Case letter. If a few words are utilized to structure the name of the method, then every internal word’s first letter ought to be in Upper Case. An example of this convention is following: public void mysamplemethod () Filename – The name of the system record ought to precisely match the class name. At the point when you are saving the file, you ought to keep it utilizing the class name. Remember Java is case touchy and affix “.java” to the end of the name. If the document name and the class name don’t match your system won’t assemble. Consider the example of a class name Sample. In this case, you must name the file as sample.java. public static void main(string args[]) Java system handling begins from the main() function, which is a required piece of each JAVA program. Java Keywords Keywords or we can say reserved words in Java. As a rule, these words cannot be used as names for variables or constants.
  • 4. List of Java keywords • abstract • break • boolean • case • byte • char • catch • const • class • default • continue • double • do • enum • else • final • extends • float • finally • goto • for • implements • if • instance of • import • int • long • interface • new • native • private • package • protected • return • public • static • short • super • strictfp • synchronized • switch • throw • this • transient • throws • while • try • volatile • void
  • 5. Comments in Java Just as in the case of C++ and C, Java supports two types of comments, namely, single-line comments and multi-line comments.The syntax for these types of comments are as follows: Single line comment: // Multiple line comment: /**/ The Java compiler simply ignores all characters that exist in the comments region. Using Blank Lines: Any line that is only composed of whitespace characters or comments is considered a blank line.These lines are just ignored by the compiler and are not included in the executable.
  • 6. Inheritance: Java supports inheritance. In other words, it is possible to derive one class from another class in this programming language. For instance, if you need to create a new class, which is an extension of an existing class, then you can derive this new class from an existing class. This allows the new class to access the elements already implemented in the existing class. In this case, the new class is called the derived class, and the current class is referred to as the superclass. Interfaces: As mentioned previously, Java is all about the interaction between objects. How different objects communicate with each other is defined in what is called an ‘interface.’ Moreover, interfaces are also an essential aspect of the inheritance feature of java. As part of an interface, the methods that can be used by a derived or sub-class are declared. However, all the methods declared as usable for the subclass must be implemented in the subclass.
  • 7. ThankYou Call us on: 70-70-90-50-90 || www.ducatindia.com