Skip to main content

Thread: Call methods after a method -> Weird ? (java)


how can possible ???

package pack;

public class {

public static void main(string[] args) {
a = new a();
system.out.println("class details : "a.getclass().getname());
}
}
output:

class details : pack.a
... how can call method after calling method, cos java not allow methods inside method.

far know, not how call function ?

package_name.class_name.method_name

1. how able call getname() after calling getclass() ?
2. there other ways of calling method other 1 quoted above ?

me beginner ....

this idiom known method chaining. getclass returns object , getname called on object.


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk [SOLVED] Call methods after a method -> Weird ? (java)


Ubuntu

Comments

Popular posts from this blog

Could not place because the source rectangle is empty

Thread: Using smartcard reader with vpnc

Adobe Font Folio 7.0 or just 7?