Open in app

Sign In

Write

Sign In

Radhika Dharmarathne
Radhika Dharmarathne

16 Followers

Home

About

Jul 27, 2022

HeadFirst Java -14-Saving Objects

Serialization and File I/O Java state can be preserved in several ways. How the state is stored is determined by how it is utilized. Serialization can be used if the produced data is unique to that Java program. When the heap receives the serialized object from the file, it processes it normally. The data…

5 min read

HeadFirst Java -14-Saving Objects
HeadFirst Java -14-Saving Objects

5 min read


Jul 26, 2022

HeadFirst Java -13-Work on Your Swing

Swing components In Simply, component means a widget which is a thing we can put in a GUI, a thing a user sees and interacts with. Text fields, buttons, scrollable lists, radio buttons, etc. are all examples of components. All the components are extended from javax.swing.JComponent. With the exception of JFrame, though…

4 min read

HeadFirst Java -13-Work on Your Swing
HeadFirst Java -13-Work on Your Swing

4 min read


Jul 26, 2022

HeadFirst Java -12-A Very Graphic Story

JFrame A JFrame is the object that represents a window on the screen. It’s where you put all the interface things like buttons, checkboxes, text fields, etc. The JFrame looks different depending on the platform. Making a GUI is easy Steps: · Make a frame (a JFrame) JFrame frame = new JFrame(); · Make a widget…

3 min read

HeadFirst Java -12-A Very Graphic Story
HeadFirst Java -12-A Very Graphic Story

3 min read


Jul 23, 2022

HeadFirst Java -11-Exception Handling

Java sound API — JavaSound is a collection of classes and interfaces added to Java starting with version 1.3. JavaSound is split into two parts: MIDI and Sampled. MIDI stands for Musical Instrument Digital Interface and is a standard protocol for getting different kinds of electronic sound equipment to communicate. …

5 min read

HeadFirst Java -10-Exception Handling
HeadFirst Java -10-Exception Handling

5 min read


Jul 22, 2022

HeadFirst Java -10-Numbers Matter

Methods in the Math class don’t use any instance variable values. And because the methods are “static”, you don’t need to have an instance of Math. All you need is the Math class. Java is object-oriented, but once in a while you have a special case, typically a utility method…

4 min read

HeadFirst Java -10-Numbers Matter
HeadFirst Java -10-Numbers Matter

4 min read


Jul 22, 2022

HeadFirst Java -09-Life and Death of an Object

Stack and Heap In Java, we (programmers) care about two areas of memory. · The one where objects live (the heap) · The one where method invocations and local variables live (the stack). Methods on the top of the stack is always the currently executing method.

3 min read

HeadFirst Java -09-Life and Death of an Object
HeadFirst Java -09-Life and Death of an Object

3 min read


Jul 22, 2022

HeadFirst Java -08-Interface & Abstract Class

Abstract class An abstract class means that nobody can ever make a new instance of that class. You can still use that abstract class as a declared reference type, for the purpose of polymorphism, but you don’t have to worry about somebody making objects of that type. The compiler guarantees it. Concrete Class A…

4 min read

HeadFirst Java -08-Interface & Abstract Class
HeadFirst Java -08-Interface & Abstract Class

4 min read


Jul 22, 2022

HeadFirst Java -07-Inheritance & Polymorphism

Inheritance Inheritance is a key feature of object-oriented programming that allows the creation of a new class from an existing class. Here the new class is called a subclass and is also known as a child or derived class. …

3 min read

HeadFirst Java -07-Inheritance & Polymorphism
HeadFirst Java -07-Inheritance & Polymorphism

3 min read


Jul 22, 2022

HeadFirst Java-06-Using the Java Library

ArrayList — What is ArrayList? The ArrayList class is a resizable array, which can be found in java. util package. Inbuilt methods of ArrayList add(Object element) => Adds the object parameter to the list. remove(int index) => Removes the object at the index parameter. remove(Object element) => Removes this object (if it’s…

4 min read

HeadFirst Java-06-Using the Java Library
HeadFirst Java-06-Using the Java Library

4 min read


Jul 22, 2022

Head First Java-05-Writing a program

Developing a class — Steps First determine what the class is supposed to do Declare the instance variables and methods Write prep code for the methods Write test code for the methods Implement the class Then test the methods. Main three things that we approach to write a class Prep code: A form of pseudocode that allows focusing on the logic rather than the…

3 min read

Head First Java-05-Writing a program
Head First Java-05-Writing a program

3 min read

Radhika Dharmarathne

Radhika Dharmarathne

16 Followers

Associate Software Engineer at Virtusa

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech