Java

Java and Garbage Collection

When a new operator is created some memory is allocated on the JVM’s heap at runtime. Garbage collection is the process of freeing the objects that are no longer in use or not referenced by the programmer, which reduces the programmer’s job to manage the memory for un-used objects thereby preventing bugs into the application.(…)

Java Tutorial – JSP template tutorials

JSP templates Use JSP templates to encapsulate Webpage layout and encourage modular design Jsp does not provide direct support for encapsulating layout. so webpage using same format usually replicate the code the include directive below allows the content of the page to vary but the remaining code remains the same. <html><head><title>JSP Templates</title></head> <body background=’graphics/background.jpg’> <table>(…)

What is Java Bean?

  i) It has a public no-args constructor   ii) It has ‘set’ and ‘get’ methods for its properties.   iii) It may have any general functions.   iv) If required it must be Serializable. If  the bean uses library classes alone, it is automatically serializable. Usage:   <jsp:useBean   id=”greeter1″   />     <%    String   s =(…)

Basic Programming Operators in Java, PHP,C, C++ and more

1. if The if statement evaluates an expression. If that expression is true, then a statement is executed. If an else clause is given and if the expression is false, then the else’s statement is executed. Syntax: if( expression ) statement1; or if( expression ) statement1; else statement2 ; Examples: if(loop<3) counter++; if(x==y) x++; else(…)

Netbeans 7.1 Beta Launch News

Feature Highlights JavaFX Support for JavaFX 2.0 Support of all three deployment models: Desktop, Applet, JNLP Preloaders to improve application loading experience Customized UI controls using CSS3   Java New Visual debugger Gap support in GridBagLayout customizer Inspect and Refactor Improved Javadoc highlighting and formatting Web Languages Support for CSS3 Code completion and documentation for(…)

Write ant-script in netbeans?

Goto > Window > Preferences > Server – configure target server runtimes right-click project > Properties > Java Build Path – lets you add additional jars and libraries. You would need the Web Tools Platform (WTP) plugin Window > Show View > Servers – opens the servers panel, where you can start/stop a server and(…)

Netbeans 7.0.1 New Features

NetBeans IDE is a modular, standards-based integrated development environment (IDE), written in the JavaTM programming language. The NetBeans project consists of a full-featured open source IDE written in the Java programming language and a rich client application platform, which can be used as a generic framework to build any kind of application. To Download click(…)

Java Tutorials – Abstraction & Encapsulation

Java Tutorials – Analysis & Design Phase Abstraction Software design has moved from low-level constructs such as writing in machine code toward much higher levels. There are two interrelated forces that guided this process: simplification & abstraction. Simplification was at work when early language designers built high-level language constructs, such as the IF statement &(…)

Java Tutorials – Analysis & Design Phase

Analysis & Design There are five primary workflows in software development project: Requirement Capture, Analysis, Design, Implementation & Test.They are all important, however you must ensure that you schedule enough time for the analysis & design phases. During the analysis phase you define the what the system is suppose to accomplish. You do that by(…)

Java Generics – Wildcards

public abstract class Animal { public void playWith(Collection playGroup) { } } public class Dog extends Animal { public void playWith(Collection playGroup) { } } The Animal class has a playWith() method that accepts a Collection of Animals. The Dog, which extends Animal, overrides this method. Let’s try to use the Dog class in an(…)