TO INSERT DATA IN A TABLE

To insert the data in a table we can use following command. SQL> insert into stu values(‘Neha’,1,’Abohar’); 1 row created. SQL> insert into stu values(‘Beant’,2,’Delhi’); 1 row created. SQL> insert into stu values(‘Kiran’,3,’Mumbai’); 1 row created. SQL> insert into stu values(‘Harjeet’,4,’Newyork’); 1 row created. SQL> insert into stu values(‘Raman’,5,’Sirsa’); 1 row created. SQL> insert into […] Continue reading →

Static and Dynamic Bindinding in Java

Binding: Connecting a method call to the method body is known as binding.There are two types of binding. Static Binding (also known as early binding). Dynamic Binding (also known as late binding). 1. Static Binding: It is also known as early binding.It is a compile time operation.When type of the object is determined at compiled […] Continue reading →

Polymorphism in Java

Polymorphism in java is a concept by which we can perform a single action by different ways. Polymorphism is derived from 2 greek words: poly and morphs. The word “poly” means many and “morphs” means forms. So polymorphism means many forms. There are two types of polymorphism in java: 1.Compile time polymorphism 2.Runtime polymorphism. We […] Continue reading →

Multilpe choice Question of Data Commnication (Set-1)

Objective type Question Set-1 Data Communication 1. The _______ is the physical path over which a message travels. A)      Protocol      B)      Medium C)  Signal D)      All the above 2  The information to be communicated in a data communications system is the _______. A)   Medium    B)Protocol   C) Message    D)        Transmission 3  Frequency of failure and network […] Continue reading →

Write a program in Java to find the sum of the series X=1+(1*2)+(1*2*3)+(1*2*3*4)+(1*2*3*4*5)+………n

//To find the  series   X=1+(1*2)+(1*2*3)+(1*2*3*4)+(1*2*3*4*5)+………n public class ss { public static void main(String arg[]) { int a,x,p; x=0; p=1; for(a=1;a<=5;a++) { p=p*a; x=x+p; } System.out.println(“The sum of the series is:”+x); } } output :             In this program output is depend on the loop if you end the loop 10 […] Continue reading →

Inheritance in Java

Inheritance is one of the key concept in the object oriented programming language. Inheritance is a technique of creating a new class from an existing class by inheriting all the features of the existing class and adding additional feature of its own.This will helps is to reused the function which are declare in another class.so,we […] Continue reading →

Write a program in Java to enter a number and check whether the number is ‘Neon’or not .a number is said to be ‘Neon’ if sum of the digits of square of a number is equal to the number itself.

//To check whether a number is Neon or not class Ne { public static void main(String arg[]) { int p,s=0,d,n; System.out.println (“Enter the number :”); n=Integer.parseInt(arg[0]); p=0; p=n*n; do { d=p%10; s=s+d; p=p/10; } while(p!=0); if(s==n) System.out.println(“It is a Neon number”); else System.out.println(“It is not a Neon number”); } } /*output: Enter the no: 9 […] Continue reading →

Encapsulation in Java

Encapsulation is grouping of the properties and methods within a class. Providing access to an object only through its messages,while keeping the details private is called information hiding.An equivalent term to information hiding is encapsulation.Encapsulation is a process that allows selective hiding of properties and methods in a class.The advantage of encapsulation is that a […] Continue reading →
Page 1 of 39123456»102030...Last »