Code: public class Test { public static void main( String args[] ) { byte b1 = 100; short b2 = 200; int b3 = 300; lon...
Read More
Showing posts with label Static in Java. Show all posts
Showing posts with label Static in Java. Show all posts
57 How to Represents Primitive data into Wrapper Class Object in Java Using Constructor?
Code: public class Test { public static void main( String args[] ) { short s1 = 235; String s2 = "500"; Short s...
Read More
56 How to Represents Primitive Byte data into Wrapper Class Byte Object?
Code: public class Test { public static void main( String args[] ) { byte b1 = 100; Byte b2 = new Byte(b1); System.ou...
Read More
55 What is hashCode() and Equals in java lang Object Class and How to Override their class in Java
How to generate identification number based on Contain? Code: package com.codingatharva; class Student { int sid ; String snam...
Read More
54 Program on Garbage Collection in Java Part:2
Program explain concept like: 1) How after completion of static method the object created inside the block becomes un-referenced in S...
Read More
53 Program on Garbage Collection in Java Part 1
Program explain concept like: 1) When jvm will skips low priority thread 2) Types of Object 3) Memory allocation type Used, Unused...
Read More
52 Program for overloading and print value using function in Java
Code: class Overloading2 { int x , y , z ; Overloading2(int a ) { x = a; } Overloading2(int a , int b) { x = a; ...
Read More
51 Program to demonstrate Overriding in Java
Code: class SuperClass { int a,b; SuperClass(int a) { this.a = a; b = 20; } void display() { System.out.println(...
Read More
Subscribe to:
Posts (Atom)