MySQL – Quick Introduction

Posted on Posted in Java

Installing MySQL on Linux (Ubuntu) Open Terminal and run following set of commands. [Please Note:  Installation requires you to have administrator password on Ubuntu]

During installation MySQL wizard may give a pop-up to provide password for root – Specify it as root. [Administrator – root, Password – root] What Should I do After Installation […]

Multithreading Tabbed Browser

Posted on Posted in Java

Multi-threading Tabbed Browser

 

Multithreading solution

Posted on Posted in Java

Multi-threading solution – Runnable interface method

  Multi-threading solution – subclass Thread method

 

Multithreading exercise

Posted on Posted in Java

Multi-threading exercise In our day to day use of our PC/laptops, we do multiple things in parallel like surfing internet ( or sometimes practicing Java coding) while listening to music. In this exercise, we are trying to do two things –    1. download a file and    2. listen to a song. Class DownloadManager is providing […]

Java – Multithreading

Posted on Posted in Java

We can think thread as a component of processes. Every process has at least one thread. Multiple threads can exist within the same process, executing concurrently and sharing the process’s resources, including memory and open files.   Q for thought: why do we need multi-threading ? Can you think of some scenarios where multi-threading helps /is required […]

Java – String Class

Posted on Posted in Java

String – Class or Primitive Data Type? String is a most frequently used Java class. Ideally to create object of String class we should write code like

But since it is most frequently used class, Java has made it easy for us to create string objects by directly assigning it a string value.

This […]

Java – Class

Posted on Posted in Java

Class is referred to a User Defined Data Type.  Generally in real world it represents a category of things,  Object is a uniquely identifiable entity of Data Type Class. MobilePhone is a class, as it represents category of devices. My iPhone 6S with IMEI Number XXXXXX and a Wallpaper of Company Logo – is uniquely […]

Java – Objects

Posted on Posted in Java

Objects are similar to variables. With few differences that will become evident in next few lines of the tutorial. Java has Eight Primitive (Basic) Data Types and Huge number of Classes (Complex Data Types). Declaration Syntax There is no difference between way we declare a variable and the way we declare an object.

Initialization & […]

Java – Variables

Posted on Posted in Java

Variables are essential part of a Java program.  Imagine if we were to write a program that prints maximum value of of three given values;  Where we store these three values and how do we compare them? That’s where variables fit it. Their key use is to hold a value. Now each variable that we […]