I want to create a method that uses dot(.) operator while calling in JAVA -


i wanted create method uses . while calling.

string a="alpha",b="beta"; a.compareto(b); 

so how access a define method compareto(). can access string b in definition of compareto(), compare b need a well. how can access a. in definition of method.

string already has compareto.

if you're talking adding new methods existing classes without access class's source, c#'s extension methods, doesn't exist in java.


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -