answersLogoWhite

0

All programming languages implement pointers, but not all languages allow low-level access to memory through a raw pointer. Java, for instance, uses resource handles and smart pointers rather than raw pointers, however the actual allocation of memory is handled by the Java virtual machine (JVM) so there is no need for low-level raw pointers.

User Avatar

Wiki User

10y ago

What else can I help you with?

Continue Learning about Engineering

What are examples of programming languages?

C, C++ and java are a couple. There are still many other programming language.


Why are they no pointers in java?

Pointers are a crucial feature of several programming languages, including C and C++, that allow direct manipulation of memory addresses. Pointers are used to create dynamic data structures, access memory directly, and create efficient algorithms. However, pointers are not available in the Java programming language. In this article, we will explore why pointers are not present in Java and the advantages and disadvantages of this decision. The main reason why pointers are not present in Java is security. Pointers allow direct access to memory addresses, which can be used to manipulate memory in unexpected ways. In Java, memory is managed automatically by the Java Virtual Machine (JVM), which helps to prevent accidental or intentional manipulation of memory. This is important for security, as malicious code could use pointers to gain unauthorized access to sensitive data or systems. By removing pointers, Java ensures that all memory access is controlled and managed, which helps to prevent security threats. Another reason why pointers are not present in Java is the ease of use. Pointers are a complex feature that can be difficult for beginner programmers to understand and use effectively. Java was designed to be an easy-to-use programming language, and by removing pointers, Java makes it easier for beginners to write correct, secure code. Java also makes it easier for programmers to write portable code, as the absence of pointers ensures that code written in Java will work on any device that supports the Java Virtual Machine. However, the absence of pointers in Java also has some disadvantages. One of the main disadvantages is that Java can be slower than languages that support pointers, as the automatic memory management provided by the JVM can be less efficient than direct memory manipulation. When handling large amounts of data, the JVM may not be able to allocate memory as efficiently as a programmer working directly with pointers. When working with pointers, a programmer has complete control over the memory allocation and can optimize it for their specific use case. Another disadvantage of the absence of pointers in Java is that some algorithms and data structures cannot be implemented as efficiently as they can be in languages that support pointers. For example, binary trees can and linked lists and are implemented more efficiently in C or C++, as they can use pointers to link nodes together in memory. Java must use other techniques, such as object references, to implement these structures, which can result in slower and less efficient code. In conclusion, the absence of pointers in Java was a deliberate decision made to improve the security and ease of use of the language. This decision has both advantages and disadvantages, as Java is easier to use and more secure, but it can be slower and less flexible than languages that support pointers. Nevertheless, the popularity of Java and its widespread use in industry and academia demonstrate that the benefits of the absence of pointers outweigh the drawbacks.


Infront of c language how many languages are there?

Too many to count ; when you consider that 'programming' started in the early 40's until the development of the C language in the early 70's there were a *lot* of other programming languages.


What are some of the different types of software programming languages?

High level languages Mid Level Languages Low level languages High level languages: cobol, fortran etc Mid level languages: C, C++ Low level languages: assembly language


In C you use the concept of pointers whereas there are no pointers used in JAVA why?

Pointers in C are generally the thing that gives learners the most trouble. When C code is not written correctly with respect to pointer use, the resulting bugs can often be very difficult to find and correct. On the other hand, pointers are absolutely necessary in some cases.The designers of Java wanted to make programming easier and hence avoided adding pointers to the language. Java does have object references which accomplish much of what pointers accomplish albeit in a safer way.

Related Questions

Which programming languages can be used on the Internet?

HTML but you can implement javascript css and other SCRIPTING LANGUAGES within HTML


Can you explain the difference between pointers and variables in programming languages?

In programming languages, variables are used to store data values, while pointers are variables that store memory addresses of other variables. Variables directly hold data, while pointers hold the location of where data is stored in memory.


What are examples of programming languages?

C, C++ and java are a couple. There are still many other programming language.


Why are they no pointers in java?

Pointers are a crucial feature of several programming languages, including C and C++, that allow direct manipulation of memory addresses. Pointers are used to create dynamic data structures, access memory directly, and create efficient algorithms. However, pointers are not available in the Java programming language. In this article, we will explore why pointers are not present in Java and the advantages and disadvantages of this decision. The main reason why pointers are not present in Java is security. Pointers allow direct access to memory addresses, which can be used to manipulate memory in unexpected ways. In Java, memory is managed automatically by the Java Virtual Machine (JVM), which helps to prevent accidental or intentional manipulation of memory. This is important for security, as malicious code could use pointers to gain unauthorized access to sensitive data or systems. By removing pointers, Java ensures that all memory access is controlled and managed, which helps to prevent security threats. Another reason why pointers are not present in Java is the ease of use. Pointers are a complex feature that can be difficult for beginner programmers to understand and use effectively. Java was designed to be an easy-to-use programming language, and by removing pointers, Java makes it easier for beginners to write correct, secure code. Java also makes it easier for programmers to write portable code, as the absence of pointers ensures that code written in Java will work on any device that supports the Java Virtual Machine. However, the absence of pointers in Java also has some disadvantages. One of the main disadvantages is that Java can be slower than languages that support pointers, as the automatic memory management provided by the JVM can be less efficient than direct memory manipulation. When handling large amounts of data, the JVM may not be able to allocate memory as efficiently as a programmer working directly with pointers. When working with pointers, a programmer has complete control over the memory allocation and can optimize it for their specific use case. Another disadvantage of the absence of pointers in Java is that some algorithms and data structures cannot be implemented as efficiently as they can be in languages that support pointers. For example, binary trees can and linked lists and are implemented more efficiently in C or C++, as they can use pointers to link nodes together in memory. Java must use other techniques, such as object references, to implement these structures, which can result in slower and less efficient code. In conclusion, the absence of pointers in Java was a deliberate decision made to improve the security and ease of use of the language. This decision has both advantages and disadvantages, as Java is easier to use and more secure, but it can be slower and less flexible than languages that support pointers. Nevertheless, the popularity of Java and its widespread use in industry and academia demonstrate that the benefits of the absence of pointers outweigh the drawbacks.


What are the disadvantages of advanced programming languages?

Taking the time to learn about advanced programming languages could cut into the timing of personal activities that should take more priority - like school and work. Advanced programming languages are also difficult to understand for novice programmers. Other obscure disadvantages lie in advanced programming - but the overall advantages outweigh them by a longshot.


What are robotics languages?

The popular programming languages which are generally used to write a robotic program may be developed in c, c++, java etc.., these languages are more flexible when compare to the other languages.


What is the computer language that is still in use?

Computer languages, more commonly called programming languages, are developed all the time, and new ones emerge regularly. While some new ones are short lived, some old ones come out of fashion or fail to catch-up with more modern developments, a wide variety of programming languages are in use.Some will argue that the C programming languages and all its derivatives, such as the C++, C# and Java languages (to name just a few) are the most widely used programming languages today.However, other programming languages are equally powerful and versatile.While programming language families such as C or Pascal are typically general-purpose languages, an even larger set of languages is specialized to a specific problem domain. These include languages specialized in describing graphics, describing data or database queries, describing programming languages and their rules, and so on and so forth. The list of specialized languages is even larger than that of general-purpose languages.


What is the difference between SQL and the other programming languages?

SQL is a query based language that is used to manipulate data stored in a database while other languages process data.


Infront of c language how many languages are there?

Too many to count ; when you consider that 'programming' started in the early 40's until the development of the C language in the early 70's there were a *lot* of other programming languages.


What are the advantages of a procedural language?

The question asks for a comparison between procedural languages, but doesn't state what those languages shall be compared with. Therefore, the question cannot be answered. I suppose one advantage of procedural languages, compared with all other high-level programming languages, is that most programmers are familiar with the general concepts, which cannot be said from many other types of high-level programming languages.


What is the significance of the lambda value in the context of programming languages?

In programming languages, the lambda value is significant because it represents an anonymous function or a function without a name. Lambda functions are commonly used for creating quick, temporary functions or for passing functions as arguments to other functions. They are a key feature in functional programming languages and allow for more concise and flexible coding.


What are some of the different types of software programming languages?

High level languages Mid Level Languages Low level languages High level languages: cobol, fortran etc Mid level languages: C, C++ Low level languages: assembly language