Metric-Cart

Blog about becoming a programmer

monitor
Programming languages

Java and C# languages

Java is a platform-independent, object-oriented programming language that is very effective in developing interactive web pages. This language was developed on the basis of the C++ language. Its essence was to abolish all low-level features when developing applications based on C++.

Structure of work in Java language
The Java language is as object-oriented as possible. Apart from imports and specifying package names, all working code is inside classes. With few exceptions, each class must be defined in a separate file and the file name must match the class name. One of the classes must necessarily contain a method-function main(), which is the entry point to the java program. In the case of a single file program, the main() method must be in that single file.

The syntax of Java is similar to that of other C-like languages. Here are some of its features:

case sensitivity – User and user identifiers in Java represent different entities;
LowerCamelCase is used to name methods. If a method name consists of one word, it must begin with a lowercase letter. Example: firstMethodName();
UpperCamelCase is used for naming classes. If the name consists of one word, it must begin with a capital letter.
Example: FirstClassName.
The name of the program files must exactly match the name of the class, taking into account case sensitivity. For example, if the class name is FirstClassName, the file should be called FirstClassName.java;
identifiers always start with a letter (A-Z, a-z), a $ sign, or underscore.

ะก#
This is also an object-oriented programming language. It belongs to the C-like language family. It is closest in syntax to C++ and Java. Its author is Anders Heilsberg and a group of engineers. Development took place at Microsoft. It was developed for the Microsoft.NET Framework. However, it was further unified as ECMA-334 and ISO/IES 23270. This language is a popular language among developers working on platforms.

Microsoft.NET Framework. Its popularity is due to its clear syntax, which is derived from C/C++ syntax, but simplifies some things. C# is object-oriented and supports polymorphism, inheritance, operator overloading, and static typing. The object-oriented approach solves the problems of building large, yet flexible, scalable, and extensible applications.

Structure of work in C#
C# is a language with a C-like syntax and is close in this respect to C++ and Java, but also supports component-oriented programming.

Program Structure – The organizational structure of C# is based on concepts such as programs, namespaces, types, members, and assemblies;
Types and Variables – Get more information about value types, reference types, and variables in C#;
Expressions – are created from operands and operators. Expressions return values.
Operators – are used instructions to describe the actions performed by a program.
Classes and Objects – classes are the most important type in C#. Objects are instances of classes. Classes are created by describing their members, which are also described in this article.
Structures are entities for storing data. They differ from classes primarily in that they are value types.
Arrays – this is a data structure containing several variables, which are accessed by calculated indices.
Interfaces – defines a contract that can be implemented by classes and structures. An interface can contain methods, properties, events and indexers. An interface does not provide an implementation of members that are defined in it. It only lists the members that must be defined in the classes or structures that implement the interface.
Delegates – represent references to methods with a specific list of parameters and the type of the return value. Delegates allow you to use methods as entities, storing them in variables and passing them as parameters. The principle of the delegates is similar to the function pointers of some languages, but in contrast to the function pointers the delegates are object-oriented and strictly typed.
Attributes-allow programs to specify additional descriptive data about types, members, and other entities.