Today we see a very good demo of this:
Package COM. toov5.reordering; Class message1 {private channel; private String title; private string content; Public message1 (channel, String title, string content) {This. channel = channel; this. title = title; this. content = content;} public void send () {If (this. channel. isconnect () {system. out. println ("Message Title" + this. title + "conten" + this. content);} else {system. out. println ("unable to send") ;}} class channel {private message1 message; public channel (String title, string content) {This. message = new message1 (this, title, content); this. message. send () ;}public Boolean isconnect () {return true ;}} public class thistest {public static void main (string [] ARGs) {channel CH = new channel ("toov5", "happy"); // message = new message (CH, "toov2", "happy"); // message. send ();}}
Awesome use of this