A deadlock is a situation where in two or more competing actions are each waiting for the other to finish, and thus neither ever does. In computer science, Coffman deadlock refers to a specific condition when two or more processes are each waiting for the other to release a resource, or more than two processes are waiting for resources [...]
Race conditions occur when multiple, asynchronously executing threads access the same object (called a shared resource) returning unexpected (wrong) results. Threads often need to share a common resource, for example a file, with one thread reading from the file while another thread writes to the file. They can be avoided by synchronizing the threads which access the [...]
Many programs contain code segments that are more or less in dependent of one another, and that may execute more efficiently if the code segments could be overlapped in time.
What is multitasking?
There are two types of multi-tasking programs.
Process based: Executing multiple programs/processes at the same time
Thread based: Single program can have many threads [...]
You can draw strings, lines, rectangles, ovals, arcs, polygons, and polylines, using the methods in the Graphics class.
paintComponent Example:
In order to draw things on a component, you need to define a class that extends JPanel and overrides its paintComponent method to specify what to draw.
Another Example:
You can call repaint() when [...]
Consider a simple GUI based Java program as shown in screenshot and code given below:
Example:
A window based program is called event driven program. The signals that a program receives from the OS as a result of your actions are called events. Unlike the old rigid old sequential programs, it puts user in charge, [...]
Java Language provides two Graphical User Interface (GUI) packages.
java.awt javax.swing
The java.awt package was the primary repository for classes that are used to create a GUI in java but many of the classes it defines have been superseded in Java 2 by javax.swing. However the Swing classes are generally derived from, and depend on, fundamental [...]
This tutorial is for the person who has basic programming skills in C language but doesn’t know much about C++ and Object-oriented Programming. There are many C++ tutorials available on the web. But this tutorial is different from others in the way that these are the lectures that I taught to graduate students at a University. Secondly, at the end of every lecture you’ll find programming exercise or home work that you can perform to test out your learning.
This tutorial is for the person who understands HTML but doesn’t know much about PHP. One of PHP’s best luxury is that it is a freely distributed open-source language, so there is all kinds of excellent reference material about it out there, which means that once you understand the basics, it is easy to find the stuff that you need to push your skills.
This tutorial is for beginners but knowledge in some programming language like C is extremely useful. This tutorial starts with basics programming language constructs in Java and then moves on to discuss Object-oriented Programming concepts in Java. For more about the programming exercises in Java visit Forums.
A string is a sequence of symbols. Java provides you with String class in java.lang package, which does not require an import statement. That means Strings are available to use anywhere. String class provides many operations for manipulating strings.
Constructors Utility Comparisons Conversions
An object of the String class represents a string of characters.
String Basics-Declaration and Creation [...]
Popular Posts (last 30 days)
- Attendance Management System 1518 view(s)
- Advanced Java Tutorial (For Intermediate) 779 view(s)
- JAVA Graphical User Interface (GUI) 699 view(s)
- Graph Implementation in C++ 532 view(s)
- File Handling using Input-Output Streams in Java 456 view(s)
- Linked lists in C++ 424 view(s)
- Sockets and Network Programming in Java 361 view(s)
- UDP Datagram Sockets in Java 349 view(s)
- Applications of Stack in data structures 334 view(s)
- Circular Linked Lists 322 view(s)
