SCJP: Short Notes #Java Short Notes #SCJP

From: http://sitestree.com/?p=4888
Categories:Java Short Notes, SCJP
Tags:
Post Data:2011-10-20 04:13:02

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

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 method to get NumberFormat instances.
  • The + quantifier in a regular expression indicates 1 or more occurrences, * indicates 0 or more, [] just one character in the group, () indicates a whole group match.
  • The default separator in Scanner class is a blank NOT a comma
  • Multiple threads can be created using the same Runnable object, but a given thread can be started only once.
  • Thread.yield(): Causes the currently executing thread object to temporarily pause and allow other threads to execute.
  • Thread.join(): Waits for this thread to die.
  • Wait(), Notify(), NotifyAll() methods
  • Low coupling: classes know the least possible about each other, is preferable over tight coupling.
  • High cohesion: Each class has well focused responsibilities. Is preferable over low cohesion.
  • Polymorphism does NOT apply to static methods.
  • Instance variable cannot be referenced from static method

From: http://sitestree.com/?p=4883
Categories:Java Short Notes, SCJP
Tags:
Post Data:2011-09-04 06:32:26

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

SCJP: Java Concurrency #Java Short Notes #SCJP

From: http://sitestree.com/?p=4879
Categories:Java Short Notes, SCJP
Tags:
Post Data:2009-04-19 03:15:05

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

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 are also character streams. May be used in socket data reading.
  • Line-Oriented I/O: BufferedReader and PrintWriter
  • Buffered Streams: BufferedInputStream and BufferedOutputStream create buffered byte streams, while BufferedReader and BufferedWriter create buffered character streams
  • You can set autoflush() of buffered streams or call manually flush() method.
  • The scanner API breaks input into individual tokens. The formatting API assembles data into nicely formatted, human-readable form.
  • Scanner:
    Scanner scanner = new Scanner(new BufferedReader(new FileReader("test.txt")));            while (s.hasNext()) {                System.out.println(s.next());            }
  • To create formatted output streams, instantiate PrintWriter not PrintStream
  • Check: System.out.format(“The square root of %d is %f.%n”, i, r);
  • System.out and System.err are PrintStream objects. PrintStream is really a byte stream but uses some mechanism to emulate character stream.
  • InputStreamReader cin = new InputStreamReader(System.in); System.in is a byte stream. InputStreamReader is used to emulate a character stream.
  • System.console provides character streams to handle console read/write operations. Provides readPassword method to read password from the console
  • Data Streams: Support I/O operations of primitive data types. DataInputStream and DataOutputStream.
  • Check:
    out = new DataOutputStream(new            BufferedOutputStream(new FileOutputStream(dataFile)));out.writeDouble(prices);out.writeInt(units);out.writeUTF(descs);
  • DataStreams detects an end-of-file condition by catching EOFException
  • Correct type to represent currency values: java.math.BigDecimal – an object type
  • Object Streams: ObjectInputStream and ObjectOutputStream. Use writeObject and readObject to write and read objects respectively.
  • A stream can contain only one copy of an object but many references to it when required.
  • File Objects: File I/O
  • Random access file:
    new RandomAccessFile("test.txt", "r");new RandomAccessFile("test.txt", "rw");RandomAccessFile methods:    * int skipBytes(int)     * void seek(long)      * long getFilePointer() 
  • The new java.nio.* package provides supports to handle file i/o for high performance applications.

From: http://sitestree.com/?p=4878
Categories:Java Short Notes, SCJP
Tags:
Post Data:2012-10-24 02:25:07

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

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

From: http://sitestree.com/?p=4876
Categories:Java Short Notes, SCJP
Tags:
Post Data:2008-03-19 18:31:53

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

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 are less than the key sent to it
  • The asList() method of Arrays creates a fixed-size list that is backed by the array, so no additions are possible.
  • A static initialization block is a normal block of code enclosed in braces, { }, and preceded by the static keyword. Used to initialize class variables
  • All enums implicitly extend java.lang.Enum.
  • A class can extend only one other class, an interface can extend any number of interfaces
  • An interface might also contain constant definitions.
  • An abstract class that implements an interface may not implement all interface methods

From: http://sitestree.com/?p=4872
Categories:Java Short Notes, SCJP
Tags:
Post Data:2012-12-07 07:48:57

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

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

From: http://sitestree.com/?p=4867
Categories:Java Short Notes, SCJP
Tags:
Post Data:2010-01-20 15:33:28

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

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 (if any). A class can implement more than one interface
  • The class body, surrounded by braces, {}.
  • Class member variable declarations
    • Requires three components, in order:
    • Zero or more modifiers, such as public or private
    • The field’s type
    • The field’s name.

Abstract Classes

  • A class declared with abstract keyword is an abstract class. It may or may not include abstract methods
  • Abstract classes cannot be instantiated
  • Abstract classes can be subclassed
  • Class containing abstract methods, must be declared to be abstract
  • Abstract methods are methods declared without implementation (braces)
  • The subclass of an abstract class must provide implementations of all the abstract methods otherwise the subclass itself needs to be declared as abstract.
  • An abstract class may have static and final fields and methods. Interfaces can not
  • If an abstract class contains only abstract method declarations with no implementations, it should better be declared as an interface
  • It’s a good design to declare a common abstract class with common methods with implementations for several very related classes (will extend the abstract class)
  • An abstract class can implement an interface but are not bound to implement all interface methods

Nested Classes

  • Classes declared under another class are called nested classes
  • Two types: Static Nested: declared with static keyword, Inner Nested: declared with no static keyword
  • inner classes have access to other members of the outer class including private members
  • Static nested classes do not have access to other members of the outer class
  • Static nested classes are accessed using the outer class name such as: OuterClass.StaticNestedClass
  • To use inner classes, the outer class must be instantiated first. Then, inner object can be created as follows: OuterClass.InnerClass innerObject = outerObject.new InnerClass();
  • Local inner classes: Declared within the body of a method
  • Anonymous inner classes: Declared within the body of a method without naming it
  • Inner classes may have similar access modifiers like other outer class members
  • Why use nested classes:
    • For logically grouping classes that are only used in one place
    • It increases encapsulation.
    • May lead to more readable and maintainable code

From: http://sitestree.com/?p=4866
Categories:Java Short Notes, SCJP
Tags:
Post Data:2012-09-13 21:25:27

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

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 error occurs
  • long primitive can be used if type casted to int
  • Object reference cannot be used as expression
  • Every case expression must be unique
  • break statement may be used at the end of a case statement, to discontinue execution.
  • There can be at most only one default statement.
  • The order of case statements and default can be anything.

break and continue

  • A break statement transfers the control out of an enclosing statement. break used within a loop breaks the execution of the current loop. In case of nested loops, the break statement passes the control to the immediate outer loop.
  • A continue statement breaks the current iteration and moves to next iteration.
  • break and continue with labels.
    • Labels specify the target (statement) for continue and break
    • continue with label does not jump to the labeled statement but instead jumps to the end of the labeled loop.
    • Same label identifiers can be reused multiple times as long as they are not nested.
    • Label names do not conflict with the same named identifier(variable, method or class name).

Checked and Unchecked Exceptions

Checked Exceptions

  • Checked Exceptions are checked by the compiler to see if these exceptions are properly caught or specified. If not, the code will fail to compile
  • Checked exception forces client program to deal with the scenario in which an exception may be thrown
  • Checked exceptions must be either declared or caught at compile time

Unchecked Exceptions

  • Unchecked exceptions are RuntimeException and all of its subclasses.
  • Class java.lang.Error and its subclasses also are unchecked.
  • Unchecked Exceptions are not checked by the compiler.
  • Runtime exceptions do not need to be caught or declared.

From: http://sitestree.com/?p=4864
Categories:Java Short Notes, SCJP
Tags:
Post Data:2008-08-25 00:56:33

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

#Engineering: #Canada: #Job/Contract/Project: Any #Engineering: #Computer, #Electrical, #Electronics, #Civil, #Chemical, #Mechanical, #Naval, #Biomedical, and misc Engineering

Date Posted:2021-07-16 .Apply yourself, or submit others as candidates; Build a recruitment team to submit others as candidates; submit RFP to be considered for projects in future; Try to become a vendor so that you are asked to submit consultants/resources in future. If these work for you. This list is posted in this blog everyday provided there are new projects under the criteria

  1. electrical-and-electronics-10006
  2. Electrical Wire Products
  3. Fleet Lighting and Electrical Components
  4. transportation-equipment-and-spares-10029
  5. Fleet Lighting and Electrical Components
  6. architect-and-engineering-services-10048
  7. Project Electrical Engineer- Peak Shavers NF 91 Project
  8. RQQ-2020-NAFA-487: Engineering Services for Mount Joy Passing Track
  9. Engineering Services-Brown Street, Sydney Mines-Waterline Upgrade
  10. Engineering Services, CS 2-20 Twinning, North of Prince Albert
  11. Engineering Design and Contract Admin Services for Riverside Lift Station
  12. Architectural & Engineering Services for Ilavut Centre Renovation
  13. Architectural and Engineering Services
  14. Engineering and Architectural Services
  15. environmental-services-10050
  16. Prime Consultant Landscape Architecture or Civil Engineering Consultant Services for David Thompson Corridor Infrastructure Safety Upgrades
  17. natural-resources-services-10051
  18. SP22TED251 – Mechanical Site Preparation – Excavator – Kamloops
  19. Mechanical Site Preparation – Excavator – Kamloops Field Team
  20. operation-of-government-owned-facilities-10039
  21. Engineering Services for Intersection Improvement Program
  22. professional-administrative-and-management-support-services-10040
  23. Engineering Advanced Design Gap Analysis Consulting Services
  24. research-and-development-r-d-10036
  25. Software reverse engineering prototypes development (W7701-217332/A)
  26. Engineering Services for Intersection Improvement Program
  27. special-studies-and-analysis-not-r-d-10047
  28. Engineering and Architectural Services
  29. undefined-10055
  30. RQQ-2020-NAFA-487: Engineering Services for Mount Joy Passing Track
  31. Keywords Used:engineer,civil,mechanical,electrical,electronics,mechatronics,naval,biomedical,computer engineer,software engineer,civil engineer,biomedical,electrical engineer,electronics engineer,mechanical engineer,metallurgical,chemical engineer,industrial engineer,communications engineer,quality assurance engineer,Aerospace engineer,aeronautical engineer,Engineering manager,Agricultural Engineer,Automotive Engineer,Environmental Engineer,Geological Engineer,Marine Engineer,Petroleum Engineer,Acoustic Engineer,Acoustic Engineer,Aerospace Engineer,Agricultural Engineer,Applied Engineer,Architectural Engineer,Audio Engineer,Automotive Engineer,Biomedical Engineer,Chemical Engineer,Civil Engineer,Computer Engineer,Electrical Engineer,Environmental Engineer,Industrial Engineer,Marine Engineer,Materials Science Engineer,Mechanical Engineer,Mechatronic Engineer,Mining and Geological Engineer,Molecular Engineer,Nanoengineering,Nuclear Engineer,Petroleum Engineer,Software Engineer,Structural Engineer,Telecommunications Engineer,Thermal Engineer,Transport Engineer,Vehicle Engineer,engineering