| |

VerySource

 Forgot password?
 Register
Search
View: 885|Reply: 6

doubt of this

[Copy link]

2

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-3-1 12:00:01
| Show all posts |Read mode
public class UpDown2 extends Applet implements Runnable {
  static int RADIUS = 20;
  static int x = 30;
  public int y = 30;
  Thread t;
  public void init () {
  t = new Thread (this); // What does this mean in this statement?
  t.start ();
  }
Please master to explain to me the use of this, a little embarrassing.
Reply

Use magic Report

2

Threads

11

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-5-15 13:15:01
| Show all posts
Can be understood as an object of UpDown2
Reply

Use magic Report

0

Threads

13

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-5-16 09:15:01
| Show all posts
this is a pointer to itself, in your case is UpDown2
Reply

Use magic Report

0

Threads

14

Posts

13.00

Credits

Newbie

Rank: 1

Credits
13.00

 China

Post time: 2020-5-16 17:45:01
| Show all posts
class UpDown2 is this here
Reply

Use magic Report

3

Threads

17

Posts

14.00

Credits

Newbie

Rank: 1

Credits
14.00

 China

Post time: 2020-5-19 19:00:01
| Show all posts
this represents the application that called the method
Reply

Use magic Report

0

Threads

11

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-5-23 11:30:01
| Show all posts
class UpDown2 is this here
Agree ~
Reply

Use magic Report

0

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 Invalid IP Address

Post time: 2020-5-24 01:15:01
| Show all posts
UpDown2 object
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list