SCJP: More Rules #Java Short Notes #SCJP

  • java -classpath gFolder/Game.jar civilization.java: In such command, -classpath will override (replace) CLASSPATH environment variable.
  • java -classpath gFolder/Game.jar civilization.java: if both gFolder and current directory contain Game.jar then the jar file under gFolder will be used.
  • If you want java compiler to recognize your jar file, either you have to mention the location of the jar file in javac command using -classpath switch or you have to add the jar file in the CLASSPATH environment variable. Mentionable - you need to add the file, adding upto the directory will not work.
  • Garbage collection: can Java program run out of memory? yes.
  • Can objects be garbage collected even if it has a valid reference? yes. when no live thread has access to the object.
  • Can Objects created within inner classes be eligible for garbage collection.? yes.
  • Do garbage collector deletes objects from the stack? No. As objects reside in heaps not in the stack.
  • If an object's finalize method runs to completion will it always be garbage collected? No. The finalize method may create some other references.
  • Arrays.equals(Object[] a1, Object[] a2) : Returns true if the two specified arrays of Objects are equal to one another
  • The results of Binary search on an unsorted array are undefined
  • Alpha go(int i) is a valid method declaration with a generic return type. class Alpha{}

From: http://sitestree.com/?p=4891
Categories:Java Short Notes, SCJP
Tags:
Post Data:2010-06-26 02:46:16

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Leave a Reply