Java Programming Tutorials

Java Programming Tutorials And Articles
  Title / Author Replies
Views
What is an EJB? An Enterprise JavaBean (EJB) is a reusable, portable J2EE component. EJBs consist of methods that encapsulate business logic. For example, an EJB may have business logic that contains a method to update customer data in a database. A variety of remote and local clients can invoke...
1
4,768
This is a basic digital clock in Java that works off your operating system time, it works in a multithreaded environment and have coded it to put my own background in. import java.awt.*; import javax.swing.*; import java.util.*; class Clock extends JFrame implements Runnable { ...
6
57,348
Introduction This Code snippet is used to capture Screenshot automatically and save it. The below code performs the function of taking screenshots automatically making use of the class java.awt.Robot .The package java.awt contains all of the classes for creating user interfaces and for...
7
3,467
Introduction The solution is mainly used in Error website wherein you have to generate reports which gives the number of solutions uploaded in a specific period(Reports by calendar) or the number of solutions posted by particular employee (reports by employee id). Background My...
10
3,499
Introduction How to split a file in to equal parts without knowing the number of records in the input file? Background Suppose you don't know how many records are in a dataset, but you want to divide the records as equal as possible among the output datasets. We can split a file into...
1
8,267
Google pagination used to find initial and final index for the search done using google3 for website application. GoogleAppSearch.java import net.sf.gsaapi.GSAClient; import net.sf.gsaapi.GSAQuery; import net.sf.gsaapi.GSAResponse; import net.sf.gsaapi.GSAQuery.GSAQueryTerm; import...
7
5,868
Compiler Problems 1. 'javac' is not recognized as an internal or external command, operable program or batch file If you receive this error, it means that Windows is not able to find the compiler (javac). Here's one way to tell Windows where to find javac. Set the PATH as follows on...
2
12,508
The Decimal Format class is not very well documented, so I will try and exmplain it with an example. Firstly, you need to import the DecimalFormat class: import java.text.DecimalFormat; Create an instance the format object. This object can be used with doubles, as it uses a decimal. It uses a...
1
6,218
A thread, by definition is a light weight process. They are used to increase functionality and performance by performing multiple tasks at the same time, i.e. concurrently. There are two methods for implementing threads in Java, Implementing an interface Extending a class I'd assume that...
7
11,496
JSTL is a collection of tags similar to HTML that lets you produce dynamic web pages without needing to learn Java. Why JSTL? JavaServer Pages (JSP) technology makes it easy to embed bits of Java code (or scriptlets) in HTML documents. This solution, however, may not be suitable for all HTML...
2
7,677
Comparing Strings To compare strings function equals() is used. String str1 = "XYZ"; String str2 = "xyz"; boolean result = str1.equals(str2); boolean result2 = str1.equalsIgnoreCase(str2);Output
6
14,806
Introduction Have you ever searched for files and folders in Windows operating system? Generally most of the users try to search various .doc files, .pdf files etc. We generally search by giving *.doc or *.pdf in the text box of the search window of the windows OS. Of course windows OS provides...
5
15,983
Introduction The 'main()' method in Java is referred to the thread that is running, whenever a Java program runs. It calls the main thread because it is the first thread that starts running when a program begins. Other threads can be spawned from this main thread. The main thread must be the...
4
40,930
There are four types of JSP tags, which are important and often required. 1. Directives These types of tags are used primarily to import packages. Altenatively you can also use these tags to define error handling pages and for session information of JSP page. <%@page language="java" %> ...
2
12,797
Using Regular Expressions in Java JDK versions 1.4.0 and later have comprehensive support for regular expressions through the standard java.util.regex package. Because Java lacked a regex package for so long, there are also many 3rd party regex packages available for Java. I will only discuss...
13
27,300
Spring Framework Features Spring is a layered Java/J2EE application framework, based on code published in Expert One-on-One J2EE Design and Development by Rod Johnson (Wrox, 2002). Spring includes: - The most complete lightweight container, providing centralized, automated configuration...
1
7,570
LDAP - The Lightweight Directory Access Protocol This directory access protocol which can either act as a gateway to other service or provide service itself. LDAP follows standardized way of managing directory information solutions of X.500. The Lightweight Directory Access Protocol, better...
1
60,059
People generally have doubt that when we use Hibernate we simply use configuration to create SessionFactory(). Using that we create session for JDBC connection. But all these SessionFactory and Session class are interfaces. But there is no class available with this name which implements methods of...
1
7,757
-
-
Struts is a free open-source framework for creating Java web applications. Web applications differ from conventional websites in that web applications can create a dynamic response. Many websites deliver only static pages. A web application can interact with databases and business logic engines...
0
3,673