java pass by reference

Ten questions for you, perhaps you are very much interested?

1. Why java.awt.event package is to be imported when java.awt is already imported. Does java.awt not include java.awt.event also? 2. How many ways you can do scanf in Java? 3. Can a string be converted to byte, short, int, long, float, double, char and boolean? 4. What is instanceof keyword? 5. Why the methods of …

Ten questions for you, perhaps you are very much interested? Read More »

StringBuffer substring Java Pass By Reference

StringBuffer substring Java Pass By Reference Many petty methods exist with StringBuffer like substring(), setLength() and trimToSize() etc. These methods are not much used in regular programming. public class MiscellaneousMethods { public static void main(String args[]) { // using substring(), to extract part of a string StringBuffer buffer1 = new StringBuffer(“TajMahal”); String s1 = buffer1.substring(3); …

StringBuffer substring Java Pass By Reference Read More »