Thursday , February 23 2017
Home / JAVA (page 2)

JAVA

Ugly Numbers Algorithm – C and Java Program

C Program / Algorithm for Ugly Numbers:  What is an Ugly Number Series? Ugly Numbers are the ones whose prime factors are 2,3 or 5 Only. We have also given a Java Source code in Method #4 So Ugly Number Series is 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, and so on… The reason why 1 is added is because ...

Read More »

Convert Writer to String in Java

Here is the Java Program for Writer to String Conversion : If you want to convert writer to string java here is the example for StringWriter Stream that is to be imported from the package Java.io. Here we are using append function.   OUTPUT Welcome to Getprogramcode.com

Read More »

How to use final keyword in Java

Many queries related how to use final keyword came across. In java we can use final keyword in three ways: 1-Declare the class as final. 2-Declare the method as final 3-Declare the variables as final.

Read More »

library classes and library functions in Java

What are library classes and library functions in Java Library Classes:- These are the predefined classes provided by Java system present in packages. These classes contain related library functions like String Math, etc. All the library classes belong to some package. Library Functions:- These are the inbuilt functions present in Java library classes, provided by Java system to help programmers to perform ...

Read More »

Java program to use super keyword

Super is a keyword which refers to reference of base class. Super is used to call any constructor or any method of base class but it must be 1st line of the derived class constructor. We use the super keyword in java for two purposes: 1-      Super keyword for calling base class constructor. 2-      Super keyword for calling base class ...

Read More »

Static keyword in java

Static keyword is often used in java for various purpose. Different programmers use different keyword according to their convenience and requirement However one could not move away from the fact that static keyword is frequently used in Java.projects We can use “static” in java in three ways: 1. static method 2. static variables 3. static block    

Read More »

Abstract class and abstract method in Java

This tutorial is to tell you about the abstract class and the abstract method in Java  Abstract Class :- A class which cannot be instantiated i.e object cannot be created only is called Abstract class. In other words ,we can say that only we can inherit the abstract class but we cannot create the object of this class to execute ...

Read More »

Basic concepts of Java

Java is Object Oriented programming language which was developed at Sun Microsystems. By object-oriented we mean, it is a technique to develop logical modules, such as classes that contain properties, methods, fields and events. An object is created in the program to represent the class. Objects are used to access data and behaviors of different software modules like classes, namespaces, ...

Read More »

Basic concepts of Java: Quick Revision

Here is the Quick Revision for those who have to clear their concepts of Java in few Minutes. Java is Object Oriented programming language which was developed at Sun Micro systems. By object-oriented we mean, it is a technique to develop logical modules, such as classes that contain properties, methods, fields and events. An object is created in the program to ...

Read More »

Constructor in Java

In Java Constructor is a block of code which gets executed automatically when object of that class is created. It is not a function so does not return any value. Name of a class and a constructor should be same. Constructor and functions are same only with difference that constructor runs automatically after the initialization of object. Constructor can be ...

Read More »