java Is this a pointer?
There is no concept of pointers in java, but there are similar pointers in c The concept of handle is slightly different in syntax, but the nature is the same. They both refer to an object of a certain class.
this in java
When local (or formal parameter) variables and member variables have the same name, Use this to represent member variables in methods to distinguish them.
If you call another method of the same class inside the method, you do not need to use this. Similarly, if there are no local variables and member variables with the same name in a method, then there is no need to use this when using member variables in this method. This has the following meaning:
1. Indicates a reference to the current object!
2. Indicates using class member variables instead of function parameters.
3. Used to reference the constructor that satisfies the specified parameter type in the constructor (actually, it is also the constructor). But you must be very careful here: only one constructor can be referenced and it must be at the beginning!
4. Obviously this cannot be used in static methods, because this refers to the current object, and static has no object.
php Chinese website, a large number of free Java introductory tutorials, welcome to learn online!
The above is the detailed content of Is java this a pointer?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Dreamweaver CS6
Visual web development tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Notepad++7.3.1
Easy-to-use and free code editor
