Code: //How to Initialize the non-static / Instance Variable by using Constructor import java.util.Scanner; class Account { long ...
Read More
61 Program on Multilevel inheritance in Java
Code: class A { int a = 111; static int b = 222; void m3() { System.out.println(" A-m3() "); } void m4() ...
Read More
59 Program on Single Level Inheritance in Java
Code: // Program on single level inheritance class A extends Object { } class Test { public static void main( String[] args ...
Read More
58 How to Represents Primitive Data into Wrapper Object by using Methods?
Code: public class Test { public static void main( String args[] ) { byte b1 = 100; short b2 = 200; int b3 = 300; lon...
Read More
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
30 Program to transfer Block Instruction in 8086 Microprocessor
; Program to transfer Block Instruction .MODEL SMALL .STACK 100 .DATA ARR1 DB 01H,02H,03H,04H,05H ARR2 DB ?,?,?,?,? .CODE ...
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
Can we able to compile and execute Java Program without Class?
Can we compile and execute without class? yes jdk 1.5 : enum; jdk 1.8 : interface; Code: Using Enum enum Test { ; p...
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
Subscribe to:
Posts (Atom)