Write a program in Java to show christmas tree using package.

//First create a package package pack3; public class tree { public void disp() { int i,j,k,l; for(i=1;i<=5;i++) { for(j=5;j>=i;j–) { System.out.print(” “); } for(k=1;k<=i;k++) { System.out.print(“*”); } for(l=i-1;l>=1;l–) { System.out.print(“*”); } System.out.print(“\n”); }} public void root() { int k,i,j; for( i=1;i<=5;i++) { for( j=1;j<5;j++) { System.out.print(” “); } for(k=1;k<=3;k++) { System.out.print(“*”); } System.out.println(” “); }}} […] Continue reading →

Objective Type Question With Answer of Computer Knowledge for Bank Exams

Objective Type Question of Computer Knowledge for Bank Exams SET–1   This component is required to process data into information and consists of integrated circuits. 1) Hard Dist           2) Ram 3) CPU                       4) ROM       5) None of these One advantage of dial-up internet access is ___. 1)  it utilizes broadband       technology 2) it utilizes existing […] Continue reading →

objective type question of Ms Access with answer

Ms-Acess 1. Which object is used to create a form? A. Tables and Queries            B. Tables only      C. Tables and reports             D. Queries and reports 2. What determines a table’s sort order? A. AutoNumber field              B. Index field        C. Field order               […] Continue reading →

String Handling in Java

String Handling provides a lot of concepts that can be performed on a string such as concatenating string, comparing string, substring etc. Let’s first understand what is string and how we can create the string object. Strings which are widely used in Java programming, are a sequence of characters. In the Java programming language, strings […] Continue reading →

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 →
Page 1 of 40123456»102030...Last »