Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: Pascal Surget
Added: Apr 14, 2018 8:02 PM
Views: 9
Tags: class field this
Replace redundant this.field=field; in constructor. Just mention _this("fieldname"), one time. It's done.
  1. public String _this(String field) {
  2.                 return "this." + field + "=" + field;
  3.         }
  4.