Posts

Object Creation & Data Types

Image
Object Creation & Data Types Object Creation Only a class can be converted to an object. So to generate an object, a class must exist. in Java. The advantage of object creation is that many objects can be generated in relation to one class, so the process can be done using only one class. Figure 1 : Object Creation Figure 1 shows the code used for object creation.  "Code" is the class that the object belongs to and "java" is the variable name of the new object which is created in that class. "new" is the object generate keyword and by using the parameter list, the variable assignment or storing the new object is done. Primitive Data Types Formats that are used to store data are called Data Types. There are 3 main Data Types. integer float (decimals) binary (1/0, true/false) In Java, there are 8 main Primitive Data Types. They are, byte char short int long float double boolean Out of these 8 primitive data types, byte, char, short, int and long are inte...

Java Standards, Class & Object

Image
Java Standards, Class & Object Java is a popular programming language widely used for application development. One of the key features of Java is its support for templates, the powerful mechanism for creating objects through its class system. Objects are created from classes, which are like blueprints that define the properties and behavior of objects. Overall, Java's support for standards and its class system make it a powerful and versatile language for building a wide range of applications. Standards Class, variable, method can be mentioned as the parts that can be seen mainly in a java code. They have unique characteristics that make them easily recognizable in Java code. The first letter to start a class is always uppercase. The first letter initializing a variable is always lowercase. The first letter starting a method is always lowercase, and parentheses must be used at the end. Figure 1 :   Example According to the simple code shown in Figure 1,  class - Code,...