1 / 7

Basic Syntax

About Java programs, it is paramount to remember the accompanying points.<br><br>Class Names u2013<br>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 wordu2019s first letter ought to be in Upper Case.

Ducat1
Download Presentation

Basic Syntax

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Welcome to Ducat India Language | Industrial Training | Digital Marketing | Web Technology | 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 Upper Case. 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. Thank You Call us on: 70-70-90-50-90 || www.ducatindia.com

More Related