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

Thread: Firefox print dialog doesn't remember settings

Error 400 - Photoshop services are not available

After Effects error:creating resource file on Windows