What is Java Programming Language?
Hello everyone again, i realize that I haven’t shared a post for a long time, and today iwill present you an application etc. in Java, which is the second most important programming language after Python. I will explain how to do it, what is java briefly, what it does. In my next post, i will explain how to program. First of all, i want to say that there is no difference between Java and Python, we use the same logic, the same algorithms, but we will have to go into a little more detail in Java. I will also leave the address of the site where i will write the codes today. Do not forget to follow my page and share it with your friends, i wish you a good reading :)
Let’s start with this question first, what do you think java is?
Java is a programming language developed by James Gosling of Sun Microsystems and was released in 1995 as a core component of Sun Microsystems. Although this language derives many syntaxes from C and C++, these derivations include a simpler object model and less low-level possibilities.
Why Do Software Developers Prefer Java?
Java; Tested, improved, extended, and validated by a dedicated community of Java developers, architects, and volunteers. Java is designed to allow the development of portable, high-performance applications for computer platforms to the widest possible extent. By making applications available across heterogeneous platforms, business owners can deliver more services and increase end-user productivity, communication and collaboration. They can also significantly reduce the cost of owning enterprise and consumer applications. Java has become extremely important to developers with the following possibilities:· Writing the software on one platform and running it on another virtual platform.
· Creates programs to work with a Web browser and accessible Web services.
· Developing server-side applications for online forums, stores, surveys, HTML forms processing and more.
· Combining applications and services using the Java language to create highly customized applications and services.
Uses it to write powerful and efficient applications for mobile phones, remote processors, microcontrollers, wireless modules, sensors, gateways, consumer products, and virtually any electronic device.
Operator Types in Java?
Operator types in Java are examined under 5 different headings. These are as follows;
1. Arithmetic Operators
2. Single Operators
3. Assignment Operators
4. Relational Operators
5. Logical Operators
1.Arithmetic Operators
Arithmetic operators are used to perform mathematical operations. The main arithmetic operators in Java are:
- (+) Performs addition.
• (-) Performs subtraction.
• (*) Performs multiplication.
• (/) Performs division.
• (%) Mode performs the operation, specifies the remainder at the end of the operation.
• (– 1) Decreases the value by one.
• (+ 1) Increases the value by one.
We do 4 operations that we know for example, like the photo below…
2. Single Operators
Only one operand is required for Java unary operators.Single operators are used to perform various operations, i.e increment or decrement a value one bu one.
- The reason why it increases and decreases by 1 is that we put “+1" and “-1".
3. Assignment Operators
The base assignment (=) is used. It is used to assign a variable value.
- For example, it happens like this by assigning 4 operations to their places.
4. Relational Operators
Relational operators provide comparisons between data. We can list them as follows:
• < (Less than)
• > (Greater than)
• == (Equals)
• != (Not equal)
• <= (Less than equals)
• >= (Big equals)
5. Logical Operators
Logical operators, as the name suggests, are operators used to logically test the obtained data. Logical operators are operators used to make comparisons such as true and false. These:
• && Conditional AND(AND) operation is performed. The result is true if all results are true in themselves, and false if at least one of them is false.
- I made an extra note to tell you, if you want, you can do it like the photo below instead of doing it like this.
- Performs a conditional OR operation. As long as at least one of the two values being compared is true, it does not return true.
What is Java Spelling (Syntax) How To ?
Java, a class-based object-oriented language, has similarities with C++ in spelling. Besides Java, languages such as C#, Perl,JavaScript also belong to the same language family. The blocks in curly brackets in the from of “{}”, the increment ++ and the decrement — operators are the prominent features of this language.
Let’s write Hello World first, let’s go from simple to difficult :)
Hello World writing :
- “HelloWorld.java” and “public class HelloWorld” must be the same in this part, otherwise the application cannot be run.
- class: Class is required to define a class.
- public: The class is accessible from outside,
- static: Shared by the class,
- void: Means it did not return a value.
- Public and Static are also called access specifiers.
- Void is also called return type.
- String args[]: We specify the parameters taken by the method in the parentheses. “String” is the class name and “args” is the parameter name. “[]” indicates that args is an array.
- “System.out.println();” We print our text and make it go to a new line.
- Write our text as “System.out.print(“Hello World!”);” We could also print it. But the cursor wouldn’t move to the new line.
- Java allows us to use Turkish characters (like C#) in “variable names, class names”.
- In order to compile the software we write in Java, we must first have the file name with the same name as the class name. We can save the sample software above as “HelloWorld.java” with its extension by using the class name “HelloWorld”. The application written in our system with J2SDK or a similar Java development environment installed can be compiled as follows.
Yes, friends, that's all the information about Java, I hope it will be useful to you and I hope I was able to help you. Don't forget to follow and like my page, if you have a place to hang out or suggest something, you can mention it in the comments. I wish everyone a nice day, see you in my next post... :)
Yes friends, that’s all the information about Java. I hope it will be useful to you and i hope i was able to help you. Don’t forget to follow and like my page, if you have a place to hang out or suggest something, you can mention it in the comments. I wish everyone a nice , see you in my next post … :) :)