Tech News is a blog created by Wasim Akhtar to deliver Technical news with the latest and greatest in the world of technology. We provide content in the form of articles, videos, and product reviews.
Order your Mac Pro today, get it in February 2014
via PCWorld http://www.macworld.com/article/2082020/order-your-mac-pro-today-get-it-in-february-2014.html#tk.rss_all
Eclipse: Convert String Concat to StringBuilder
Here is a simple yet effective trick for all Eclipse users. In Java we do lot of String concatenation using plain old “” + “”. It is easy but not too effective. StringBuilder is always preferred if you have too many strings to concate.
In below screencast, I convert concatenated strings to StringBuilder using eclipse Ctrl + 1 option.
Move cursor on String “foo” and press Ctrl + 1. It opens a context menu. Select option Use “StringBuilder” for string concatenation
String foo = "This" + "is" + "Sparta";
System.out.println(foo);
Once done, the code will be converted to below:
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("This");
stringBuilder.append("is");
stringBuilder.append("Sparta");
String foo = stringBuilder.toString();
System.out.println(foo);
Enjoy
Related Posts
- Eclipse Tip: Add your own Code Template in Eclipse
- Eclipse Tip: Hide Closed Projects in Eclipse Project Explorer View
- Eclipse resolve “resource is out of sync with the filesystem” permanently
- 20 very useful Eclipse IDE Shortcuts for Developers
- Convert String to Enum Instance in Java
- Eclipse: This project needs to migrate WTP metadata
- Inspect your code in Eclipse using Eclipse Scrapbook feature
via ViralPatel.net http://feedproxy.google.com/~r/viralpatelnet/~3/31caPuoFL5s/
Windows 11 Insider Preview Build 29558.1000 Released to New Canary Channel
UPDATE: Windows 11 Insider Preview build 29558.1000 released to the new Canary channel. Windows Insiders on the refreshed Canary Channel wil...
-
UPDATE: Direct download links added for the latest Mozilla Firefox 131.0.2, 115.16.1 ESR and 128.3.1 ESR offline installers. NOTE: The downl...
-
Newer versions of Windows 11 come with a new security feature called “Windows Protected Print Mode (WPP)“. This article will help you in act...