Category: Java

SCJP Training: Lesson 3: API Contents #Java Short Notes #SCJP

The Number Classes Characters Strings The StringBuilder Class Character Streams (FileReader, FileWriter) Buffered Streams (BufferedReader, BufferedWriter) Formatting (PrintWriter) File Objects (File) Data Streams Object Streams Manipulating Characters in a String (String split method) Methods of the Pattern Class Methods of the Matcher Class Scanning Formatting Formatting (PrintWriter, formatting parameters) Formatting Numeric Print Output (formatting parameters) …

Continue reading

Permanent link to this article: http://bangla.sitestree.com/scjp-training-lesson-3-api-contents-java-short-notes-scjp/

SCJP Training: Lesson 4: Concurrency #Java Short Notes #SCJP

Defining and Starting a Thread The SimpleThreads Example Thread Interference Memory Consistency Errors Synchronized Methods Intrinsic Locks and Synchronization Atomic Access Guarded Blocks From: http://sitestree.com/?p=5051 Categories:Java Short Notes, SCJPTags: Post Data:2006-11-03 06:59:23 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: …

Continue reading

Permanent link to this article: http://bangla.sitestree.com/scjp-training-lesson-4-concurrency-java-short-notes-scjp/

SCJP Training: Lesson 5: OO Concepts #Java Short Notes #SCJP

Inheritance Inheritance Overriding and Hiding Methods Using the Keyword super Overriding and Hiding Methods Defining Methods Using the Keyword super From: http://sitestree.com/?p=5052 Categories:Java Short Notes, SCJPTags: Post Data:2009-12-15 16:31:08 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

Permanent link to this article: http://bangla.sitestree.com/scjp-training-lesson-5-oo-concepts-java-short-notes-scjp/

SCJP Training: Lesson 6: Collections / Generics #Java Short Notes #SCJP

Object Ordering Object as a Superclass Generic Types Declaring Classes Defining an Interface Passing Information to a Method or Constructor Returning a Value from a Method Generic Types Generic Methods and Constructors Wildcards Algorithms From: http://sitestree.com/?p=5053 Categories:Java Short Notes, SCJPTags: Post Data:2012-07-21 07:53:36 Shop Online: https://www.ShopForSoul.com/ (Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com In …

Continue reading

Permanent link to this article: http://bangla.sitestree.com/scjp-training-lesson-6-collections-generics-java-short-notes-scjp/

SCJP Training: Lesson 7: Fundamentals #Java Short Notes #SCJP

Controlling Access to Members of a Class Using Package Members Command-Line Arguments Command-Line I/O Objects Passing information to a Method or Constructor Using Objects Managing Source and Class Files Assignment, Arithmetic, and Unary Operators Equality, Relational, and Conditional Operators Object as a Superclass Comparing Strings and Portions of Strings From: http://sitestree.com/?p=5054 Categories:Java Short Notes, SCJPTags: …

Continue reading

Permanent link to this article: http://bangla.sitestree.com/scjp-training-lesson-7-fundamentals-java-short-notes-scjp/

SCJP Essential Knowledge #Java Short Notes #SCJP

int x=5; String y=”3″; System.out.print(x + 1 + y); Output: 63 When there is no live reference to an object, the object becomes eligible for garbage collection. The concrete interface method implementation must be public. When a class implements Comparator, it must implement a compare method. When a class implements Comparable, it must implement a …

Continue reading

Permanent link to this article: http://bangla.sitestree.com/scjp-essential-knowledge-java-short-notes-scjp/

SCJP Training: Lesson 1: Develop code that declares classes (including abstract and all forms of nested classes), interfaces, and enums, and includes the appropriate use of package and import statements (including static imports). #Java Short Notes #SCJP

Declaring Classes Abstract Methods and Classes Nested Classes Interfaces Enum Types Creating and Using Packages Using Package Members (import statements, static imports) Defining an Interface Implementing an Interface Abstract Methods and Classes Primitive Data Types Arrays Enum Types Understanding Instance and Class Members Variables Declaring Member Variables Understanding Instance and Class Members Passing Information to …

Continue reading

Permanent link to this article: http://bangla.sitestree.com/scjp-training-lesson-1-develop-code-that-declares-classes-including-abstract-and-all-forms-of-nested-classes-interfaces-and-enums-and-includes-the-appropriate-use-of-package-and-import-statemen/

SCJP Training: Lesson 2: Flow Control #Java Short Notes #SCJP

The if-then and if-then-else Statements The switch statement The for Statement The while and do-while Statements Branching Statements Questions and Exercises:Classes (assertion example) Catching and Handling Exceptions The try Block The catch Blocks The finally Block Putting It All Together The Catch or Specify Requirement Specifying the Exceptions Thrown by a Method Putting It All …

Continue reading

Permanent link to this article: http://bangla.sitestree.com/scjp-training-lesson-2-flow-control-java-short-notes-scjp/

SCJP: Rules #Java Short Notes #SCJP

A class’s superclasses don’t have to implement Serializable in order to be serialized if a superclass doesn’t implement Serializable then it’s constructor will run during deserialization A transient variable’s state is lost during serialization, but a volatile variable’s state is not lost Java:Volatile variable Transient Variable NumberFormat, Calendar, DateFormat are abstract classes. Use the getInstance …

Continue reading

Permanent link to this article: http://bangla.sitestree.com/scjp-rules-java-short-notes-scjp/

SCJP: Short Notes #Java Short Notes #SCJP

For the package package com.sun2;public enum Seasons {SUMMER, FALL, WINTER, SPRING} Valid import statements are: import com.sun2.Seasons; // the class import static com.sun2.Seasons.*; //all enum valuesimport static com.sun2.Seasons.FALL; //only one enum value An interface can extend many interfaces Interfaces can have variables, overrides and overloads An enum can have methods and can override those methods …

Continue reading

Permanent link to this article: http://bangla.sitestree.com/scjp-short-notes-java-short-notes-scjp/

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 …

Continue reading

Permanent link to this article: http://bangla.sitestree.com/scjp-more-rules-java-short-notes-scjp/

SCJP Practice Exams #Java Short Notes #SCJP

Check these practice exams. Be careful that many java rules may have changed over the time. Check that which jdk version or the exam these practice exams support http://www.jchq.net/mockexams/exam2.htm 20 practice exams Java Ranch JavaRanch Self Tester Marcus Green’s Mock Exam 1 Marcus Green’s Mock Exam 2 Marcus Green’s Mock Exam 3 Sun’s SCJP2 Site …

Continue reading

Permanent link to this article: http://bangla.sitestree.com/scjp-practice-exams-java-short-notes-scjp/

SCJP: Basic Java I/O #Java Short Notes #SCJP

ByteStream is the basic I/O stream. Handles data as a stream of bytes. Does operation with byte unit and uses 8 bit. FileInputStream, FileOutputStream – can be used to copy files as byte by byte. Character Streams: FileReader and FileWriter are character streams. They treat file data as 16 bit unicode charater streams. InputStreamReader, OutputStreamWriter …

Continue reading

Permanent link to this article: http://bangla.sitestree.com/scjp-basic-java-i-o-java-short-notes-scjp/

SCJP: Java Concurrency #Java Short Notes #SCJP

Java High Level Concurrency Objects constructors cannot be synchronized Liveness of multi-threaded applications Immutable Objects An application may have one or more processes. A process may have one or more threads. Two ways to create threads Thread.sleep(4000); To pause a thread. The time like 4000 ms is really dependent on the os and not precise …

Continue reading

Permanent link to this article: http://bangla.sitestree.com/scjp-java-concurrency-java-short-notes-scjp/

SCJP: Interfaces #Java Short Notes #SCJP

Interface An interface is a reference type, similar to a class Interfaces can contain only constants, method signatures, and nested types No method is implemented Interfaces cannot be instantiated They can only be implemented by classes or extended by other interfaces Interfaces are not part of the class hierarchy A class can implement multiple interfaces …

Continue reading

Permanent link to this article: http://bangla.sitestree.com/scjp-interfaces-java-short-notes-scjp/

SCJP: Random Stuffs #Java Short Notes #SCJP

An enum may NOT be declared in a method An enum can be imported If the JVM has a choice, it will select a method without varargs before selecting a method with varargs When enums are equal, both .equals and == always return true The headMap() method returns the portion of the map whose keys …

Continue reading

Permanent link to this article: http://bangla.sitestree.com/scjp-random-stuffs-java-short-notes-scjp/

Java : SCJP: Important Resources #Java Short Notes #SCJP

How to use generics to avoid runtime errors. More Generics Class casting in Java: How to avoid runtime exception – ClassCastException: overloading, overriding, variable and method hiding Java HotSpot virtual machine What Java Technology can do? Offers from Java Technology Java:Common Problems (and Their Solutions) Benefits of OOP: Modularity, Information-hiding, Code re-use, Pluggability and debugging …

Continue reading

Permanent link to this article: http://bangla.sitestree.com/java-scjp-important-resources-java-short-notes-scjp/

SCJP: Class Declarations #Java Short Notes #SCJP

class declarations Start with modifiers such as public, private followed by class keyword The class name, with the initial letter capitalized The name of the class’s parent (superclass), preceded by the keyword extends (if any). A class can only extend (subclass) one parent. list of interfaces implemented by the class, preceded by the keyword implements …

Continue reading

Permanent link to this article: http://bangla.sitestree.com/scjp-class-declarations-java-short-notes-scjp/

SCJP: Flow controls and exception #Java Short Notes #SCJP

Flow Control and ExceptionsFlow control statements Conditional: if, if-else and switch-case Looping: for, while, do-while Exception handling: try-catch-finally, throw Ad hoc flow control: break, continue with or without labels switch statement switch(expression){ case ConstantExpression: statement(s); case ConstantExpression: statement(s); . . . default: statement(s); } expression: must be char, byte, short, or int, or a compile-time …

Continue reading

Permanent link to this article: http://bangla.sitestree.com/scjp-flow-controls-and-exception-java-short-notes-scjp/

SCJP: Classpath and Jar #Java Short Notes #SCJP #Blog

Java certification exams like SCJP test your knowledge about java classpath. Check here for an excellent resource on the topic . System classpath We can specify classpath in the command line or make use of a `system’ class path. The IDEs have their own way of maintaining class paths. System class paths will be used …

Continue reading

Permanent link to this article: http://bangla.sitestree.com/scjp-classpath-and-jar-java-short-notes-scjp-blog/

SCJP: Java Operators #Java Short Notes #SCJP

Exams like SCJP test your understanding of Java operators and how to use them like: assignment operators: =, +=, -=arithmetic operators: +, -, *, /, %, ++, –relational operators: < , , >=, ==, !=logical operators: &, |, ^, !, &&, ||conditional operators: ? : Also operators to check the equality of two objects or …

Continue reading

Permanent link to this article: http://bangla.sitestree.com/scjp-java-operators-java-short-notes-scjp/

SCJP: Language Fundamentals #Java Short Notes #SCJP

Class declaration and java source file. Only “one” top-level public class is allowed per java source file. The name of the java source file and the name of the top-level public class MUST be the same. If no public class is there in a file, after compiling separate class files will be created for all …

Continue reading

Permanent link to this article: http://bangla.sitestree.com/scjp-language-fundamentals-java-short-notes-scjp/

SCJP: Garbage Collection #Java Short Notes #SCJP

Garbage Collection Java itself does memory management. You do not need to allocate memory at the time of object creation; also you do not need to free memory explicitly Object is created either on the heap or on a stack Memory heap: Objects created with new keyword are placed in heaps. This memory remains allocated …

Continue reading

Permanent link to this article: http://bangla.sitestree.com/scjp-garbage-collection-java-short-notes-scjp/

JAVA: Some links: useful for exams like scjp/scja #Java Short Notes #SCJP #Blog

Assertions in Java: http://java.sun.com/j2se/1.4.2/docs/guide/lang/assert.html Enum in Java:http://www.java2s.com/Code/Java/Language-Basics/Enum.htmStringBuffer and StringBuilder Classes have similar methods where StringBuffer is synchronized: http://java.sun.com/j2se/1.5.0/docs/api/java/lang/StringBuilder.htmlSerialize and Deserialize: http://java.sun.com/j2se/1.4.2/docs/api/java/io/Serializable.htmljava.util package is very important: http://java.sun.com/j2se/1.4.2/docs/api/java/util/package-summary.html From: http://sitestree.com/?p=4845 Categories:Java Short Notes, SCJP, BlogTags: Post Data:2013-06-11 18:38:25 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 …

Continue reading

Permanent link to this article: http://bangla.sitestree.com/java-some-links-useful-for-exams-like-scjp-scja-java-short-notes-scjp-blog/

Pretty Simple Java Code #SCJP

/** * The HelloWorldApp class implements an application that * simply prints “Hello World!” to standard output. */ class HelloWorldApp { public static void main(String[] args) { System.out.println(“Hello Worlld”); } } class ArrayDemo { public static void main(String[] args) { // declares an array of integers int[] anArray; int[] theArray; // allocates memory for 10 …

Continue reading

Permanent link to this article: http://bangla.sitestree.com/pretty-simple-java-code-scjp/

SCJP: Sun Certified Java Programmer: All that you need to know #SCJP

Introduction to Sun Certified Java Programmer Certification Course Java : SCJP: Important Resources JAVA: Some links: useful for exams like scjp/scja SCJP Essential Knowledge SCJP Practice Exams SCJP Training: Lesson 1: Develop code that declares classes (including abstract and all forms of nested classes), interfaces, and enums, and includes the appropriate use of package and …

Continue reading

Permanent link to this article: http://bangla.sitestree.com/scjp-sun-certified-java-programmer-all-that-you-need-to-know-scjp/

SCJP: Topics and Resources : will be continued #SCJP

SCJP topics and related resources are provided. I have skimed through the resources at least one time. Garbage Collection Test area:Given a code example, recognize the point at which an object becomes eligible for garbage collection, determine what is and is not guaranteed by the garbage collection system, and recognize the behaviors of the Object.finalize() …

Continue reading

Permanent link to this article: http://bangla.sitestree.com/scjp-topics-and-resources-will-be-continued-scjp/

SCJP: Java Operators #SCJP

By Sayed Exams like SCJP test your understanding of Java operators and how to use them like: assignment operators: =, +=, -= arithmetic operators: +, -, *, /, %, ++, — relational operators: <, <=, >, >=, ==, != logical operators: &, |, ^, !, &&, || conditional operators: ? : Also operators to check …

Continue reading

Permanent link to this article: http://bangla.sitestree.com/scjp-java-operators-scjp/

Lecture – 15: concept of array (java tutorial in bangla) (লেকচার – ১৫: অ্যারের ধারণা (জাভা বাংলা টিউটোরিয়াল))

Permanent link to this article: http://bangla.sitestree.com/lecture-15-concept-of-array-java-tutorial-in-bangla/

Lecture – 14: averaging calculator using for loop (java tutorial in bangla) (লেকচার – ১৪: লুপের জন্য গণককে সাজানো (জাভা বাংলা টিউটোরিয়াল))

Permanent link to this article: http://bangla.sitestree.com/lecture-14-averaging-calculator-using-for-loop-java-tutorial-in-bangla/

Lecture – 13: for loop (java tutorial in bangla) (লেকচার – ১৩: লুপ (বাংলা জাভা টিউটোরিয়াল))

Permanent link to this article: http://bangla.sitestree.com/lecture-13-for-loop-java-tutorial-in-bangla/

Lecture – 12: do-while loop (java tutorial in bangla) (লেকচার – ১২: ডু-হুয়াইল লুপ (বাংলা জাভা টিউটোরিয়াল))

Permanent link to this article: http://bangla.sitestree.com/lecture-12-do-while-loop-java-tutorial-in-bangla/

Lecture – 11:while loop (java tutorial in bangla) (লেকচার – ১১: হোয়াইল লুপ (বাংলা জাভা টিউটোরিয়াল))

Permanent link to this article: http://bangla.sitestree.com/lecture-11while-loop-java-tutorial-in-bangla/

Lecture – 10: else if & nested if-else (java tutorial in bangla) (লেকচার – ১০: else if & nested if-else (বাংলা জাভা টিউটোরিয়াল))

Permanent link to this article: http://bangla.sitestree.com/lecture-10-else-if-nested-if-else-java-tutorial-in-bangla/

Lecture – 09: switch statement (java tutorial in bangla) (লেকচার – ০৯: সুইচ স্টেটমেন্ট (বাংলা জাভা টিউটোরিয়াল))

Permanent link to this article: http://bangla.sitestree.com/lecture-09-switch-statement-java-tutorial-in-bangla/

Lecture – 08: logical operator (java tutorial in bangla) (লেকচার – ০৮: লজিক্যাল অপারেটর (বাংলা জাভা টিউটোরিয়াল))

Permanent link to this article: http://bangla.sitestree.com/lecture-08-logical-operator-java-tutorial-in-bangla/

Lecture – 07: if else statement & comparison operator (java tutorial in bangla) (লেকচার – ০৭: if else statement এবং comparison operator (বাংলা জাভা টিউটোরিয়াল))

Permanent link to this article: http://bangla.sitestree.com/lecture-07-if-else-statement-comparison-operator-java-tutorial-in-bangla/

Lecture – 06: user input & calculator (java tutorial in bangla) (লেকচার – ০৬: ব্যবহারকারীর ইনপুট এবং ক্যালকুলেটর (বাংলা জাভা টিউটোরিয়াল))

Permanent link to this article: http://bangla.sitestree.com/lecture-06-user-input-calculator-java-tutorial-in-bangla/

Lecture – 05: incrementing operator (java tutorial in bangla) (লেকচার – ০৫: বৃদ্ধিশীল অপারেটর (বাংলা জাভা টিউটোরিয়াল))

Permanent link to this article: http://bangla.sitestree.com/lecture-05-incrementing-operator-java-tutorial-in-bangla/

Lecture – 04: mathematical operators (java tutorial in bangla) (লেকচার – ০৪: গাণিতিক অপারেটর (বাংলা জাভা টিউটোরিয়াল))

Permanent link to this article: http://bangla.sitestree.com/lecture-04-mathematical-operators-java-tutorial-in-bangla/

Lecture – 03: variables (java tutorial in bangla) (লেকচার – ০৩: ভেরিয়েবল (বাংলা জাভা টিউটোরিয়াল))

Permanent link to this article: http://bangla.sitestree.com/lecture-03-variables-java-tutorial-in-bangla/

Lecture – 02: first java program (java tutorial in bangla) (লেকচার – ০২: প্রথম জাভা প্রোগ্রাম (বাংলা জাভা টিউটোরিয়াল))

Permanent link to this article: http://bangla.sitestree.com/lecture-02-first-java-program-java-tutorial-in-bangla/

Lecture – 01: installing IDE & creating java project (java tutorial in bangla) (লেকচার – ০১: আইডিই ইনস্টল ও জাভা প্রজেক্ট তৈরি (বাংলা জাভা টিউটোরিয়াল))

Permanent link to this article: http://bangla.sitestree.com/lecture-01-installing-ide-creating-java-project-java-tutorial-in-bangla/