UrbanPro

Learn Java Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Can we use pointer in java?

Asked by Last Modified  

25 Answers

Learn Java

Follow 0
Answer

Please enter your answer

Software Developer, Expertise in Java/J2ee Technology.

No, we can't. Java has reference variables which contains address of objects. The reference variables are substitute to pointers in java. But, we cannot perform mathematical operations on reference variables like pointers. (ie we cannot play with memory locations in java)
Comments

There is no pointer in java.
Comments

Hello Manish :-). We can not use pointers in Java because the language designers chose not to include pointers in the language.
Comments

The term "pointer" is strongly associated with the C/C++ concept of pointers, which are variables which explicitly store memory addresses, and which can be modified arithmetically to point to any arbitrary address. In Java, pointers exist, but not as a first-class language concept. Rather, pointers only...
read more
The term "pointer" is strongly associated with the C/C++ concept of pointers, which are variables which explicitly store memory addresses, and which can be modified arithmetically to point to any arbitrary address. In Java, pointers exist, but not as a first-class language concept. Rather, pointers only exist as an implementation detail for References. The spec says: An object is a class instance or an array. The reference values (often just references) are pointers to these objects, and a special null reference, which refers to no object. It's also telling that accessing a null reference throws a NullPointerException, not a NullReferenceException. So, clearly the Java designers were at least thinking in terms of pointers when they wrote the Java language spec. (Although really it should be called a NullReferenceException; in my opinion the name of that exception leaks through the abstraction) So, the answer is that Java References are "pointer-ish", in the sense that they are implemented in terms of pointers (just like most implementations of C++ references), but Java References provide a higher-level abstraction which restricts the programmer from manipulating the actual memory address. Syntactically, a Java reference only gives you access to the members or methods of the pointed-to Object - not the memory location of the Object. So yes, pointers exist in Java, for a certain value of "exist". But it's probably not helpful to speak in terms of "pointers" when discussing Java language concepts. read less
Comments

iOS, iPhone application development, opengles trainer

Java uses something called as reference in C++. No need to use the -> / * to dereference. Just '.' is fine.
Comments

IT Professional Trainer with 15 years of experience in IT Industry

No, You can not use pointer in java.
Comments

Tutor

Java doesn't have pointer. instead of pointer, java have reference type data type like object that point to that location reserved for the object.
Comments

Industry expert and professional lecturer/trainer

No there are no pointers in Java for developers to use.
Comments

no
Comments

Maths - Physics - Computers (MPC) Thinker

Using JNI we can call c functions ( may have pointers ). Direct support for C like pointers is not available due to security flaws of pointers. In java variables are mostly reference variables i.e in theory they are pointers as they point to memory. But direct allocation of specific memory segments as...
read more
Using JNI we can call c functions ( may have pointers ). Direct support for C like pointers is not available due to security flaws of pointers. In java variables are mostly reference variables i.e in theory they are pointers as they point to memory. But direct allocation of specific memory segments as in C is not available in Java. In Java entire memory allocation and de-allocation is done by JVM read less
Comments

View 23 more Answers

Related Questions

How do I show a popup message over a system tray icon/application in Java?
The java.awt.SystemTray class introduced in Java™ SE version 6 represents the system tray for a desktop. The system tray can be accessed by calling the static SystemTray.getSystemTray() method. Before...
Ajith
0 0
5
I am looking for live project trainer for Java j2ee near Hinjewadi ph 3 or near Bavdhan. Thanks
I am a passoniate software enginner and a professional trainer. I can provide support for your live project.
Richa
Is it good to go for a Java coaching center and learn Java (with advanced Java) to improve my programming skills?
yes, Please check the Institute reviews and discuss with the tutor, what topics were covered in class. Ask about the practicals session and how many hours/duration of the course.
Gerda
0 0
5
What are the advanced Java topics?
Mainly divided in three parts JDBC,SERVLET,JSP and each one contains multiple sub topics
Ganesh
0 0
5

How to prepare for CORE JAVA for Android Developement?

Core Java is required for basic understanding of inheritance , AWT with button action programs, library usage etc then after u can genrate your logic with additional topics of Android
Rishabh
0 0
6

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Implementation: What Is JPA And JPA?
The basic Java framework to access the database is JDBC. Unfortunately, with JDBC, a lot of hand work is needed to convert a database query result into Java classes. JPA allows us to work with Java classes...

Mastering in Java Programming
Core java topics What is Java?Execution Model Of JavaBytecodeHow to Get Java?A First Java ProgramCompiling and Interpreting ApplicationsThe JDK Directory StructureUsing Eclipse Data types and Variables What...

Introduction to Programming Languages
What is a Programming Language? A programming language is a formal computer language or constructed language designed to communicate instructions to a machine, particularly a computer. Programming languages...

Overloading in JAVA
When a class contains more than one method with the same method name but different argument types, then it is called Overloading. Methods are said to be Overloaded methods. Also, know as Compile time...

Android : Application Launch time improvements.
For any standard android application, below 3 components play important roles to show 1st interface to user, so that he/she can interact with the app. 1. Custom Application class : Intialize the components...

Recommended Articles

Java is the most famous programming language till date. 20 years is a big time for any programming language to survive and gain strength. Java has been proved to be one of the most reliable programming languages for networked computers. source:techcentral.com Java was developed to pertain over the Internet. Over...

Read full article >

Before we start on the importance of learning JavaScript, let’s start with a short introduction on the topic. JavaScript is the most popular programming language in the world, precisely it is the language - for Computers, the Web, Servers, Smart Phone, Laptops, Mobiles, Tablets and more. And if you are a beginner or planning...

Read full article >

Java is the most commonly used popular programming language for the creation of web applications and platform today. Integrated Cloud Applications and Platform Services Oracle says, “Java developers worldwide has over 9 million and runs approximately 3 billion mobile phones”.  Right from its first implication as java 1.0...

Read full article >

Designed in a flexible and user-friendly demeanor, Java is the most commonly used programming language for the creation of web applications and platform. It allows developers to “write once, run anywhere” (WORA). It is general-purpose, a high-level programming language developed by Sun Microsystem. Initially known as an...

Read full article >

Looking for Java Training Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Java Training Classes?

The best tutors for Java Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Java Training with the Best Tutors

The best Tutors for Java Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more