1. Syntax Definition
Syntax language, also known as syntax, can be interpreted as rules that must be met in order to achieve the goals of a programmer. The purpose of this syntax or rule is so that the code or script written can be justified and understood by the computer. These rules are set by default and are found in every programming language from Java, PHP, C, C++ and many more.
In essence, in making a program, a script or code is needed that must be written as a command in the program being created, be it desktop programming or the web. When the program file is executed or compiled, every line of the script will be checked by the computer system and must be understood. This is where the vital role of the syntax itself is to provide special rules so that the program can run properly. It can be concluded that scripts and syntax are equally important in the programming world.
2. Syntax Example
a. Syntax in Java
• Case sensitive is a method that can classify letters into uppercase and lowercase letters. Examples of Case Sensitive are “Double” and “double” which of course have different meanings and functions.
• Class & Program Names, basically naming a class in Java must begin with a capital letter or in each word. An example of proper class naming is “className” or “className”. The program name must also have the same name as the existing class name (applies to programs that have one class). If you encounter a program with several classes, the names must also be identical to each other. An example of naming a program is “Application” with a class name also named “Application”.
• Method Names, method names must begin with a lowercase letter. If a method has a name of more than one word then the second word and so on are then capitalized. An example would be “my public void method”.
• Main Method, in Java a class to be executed or executed must have a main method as a mandatory requirement. An example of writing the main method is a patent like this “public static void main(Strings[] args)”.
b. Syntax on the Web (HTML)
On the web the rules or syntax that are enforced are more extensive and detailed, and are found in almost all code or script writing that is done. Some examples of the syntax are as follows:
• <a> is the definition of an anchor tag or a general term, namely hyperlink, according to the first name taken, namely the letter “A”. By writing a link in the anchor tag and then pasting it on an object, after clicking it, you will be taken to another page according to the address.
• <body> is a syntax that indicates that it is starting to enter the body of a web page. Usually in the body there is logic and the contents of the page to be created such as tables, images or other information.
• <div> becomes a syntax that plays an important role in grouping several elements on the web. Such as determining the font size of some text or paragraphs, you can use this tag.
• <h1> to <h6> becomes the definition of several types of text (headings) based on their size, starting from the largest h1 to the smallest h6. Paragraph text usually uses a general tag for paragraphs, namely <
The need for digital IT is needed in daily activities, Bead IT Consultant is the right choice as your partner, visit our website by clicking this link: www.beadgroup.com