Skip to main content

Posts

Acronyms to remember in computer science

 Acronyms to remember in computer science ALU → Arithmetic Logic Unit ASCII→ American Standard Code for Information Interchange BCD→ BinaryCodedDecimalCode BASIC—> Beginners All Purpose Symbolic CAD→ Computer Aided Design CD→ Compact Disc C_DOT→ Center for Development of Telematics CLASS→ Computer Literacy and study for School C_DAC→ Center for Development of Advanced Computing CD-ROM —> Compact Disk Read Only Memory CPU —> Central Process Unit CRT —> Cathod Ray Table DOS→ Disk Operating System DTP→ Desktop Publishing ENIAC→ Electronic Numerical Integrator and Calculator E MAIL —> Electronic Mail FAT —> File Allocation Table HD —> Hard Disk HTML→ Hypertext Markup Language HTTP→ Hypertext Transfer Protocol IBM→ International Business Machine ISDN→ Integrated Services Digital Network ISP —> Internet Service Protocol IC —> Integrated Circuit LCD —> Liquid Crystal Display LAN —> Local Area Network MICR —> Magnetic Ink Charactor Reader MIME —>Mult...

countdown timer program in java

 Java program that countdown in ten second and then print Happy New Year. Thread class method s in java  Multithreading in java Write a java program that countdown in ten second and then print Happy New Year? class ThreadDemo extends Thread {   public static void main(String a[])throws InterruptedException {   for(int time=10;time>0;--time){   System.out.println("second @:"+time);   Thread.sleep(1000); }   System.out.println("HAPPY NEW YEAR"); } } CMD OUTPUT watching onscreen recording video👇

How to run java program in windows 10 using CMD

How to run java program in windows 10 using command prompt How to run java program in notepad and cmd Java is the most popular platform independent computer programming language that operates on the Oops concept. It is a fast, secure, reliable programming language for coding everything from mobile apps and enterprise software to big data applications and server-side technologies. Any computer language requires some software tools to run. Similarly, to run a Java program, you must first install JDK on your system. Then open the notepad and write the Java program.Save the file with the same name given to the class in the Java program and Give the file extension java. Go to the folder, After that, press Alt+D type CMD press enter key CMD will open on that folder. Just type javac file_name.java . If there is an error in the program, it will be displayed on the console If there is no error, if you give the name of the java file Just type java file_name' you will get the output. Ja...

simple 25-java programs with output

Easy 25-java programs for practice Java programs for beginners 

Introduction to java applets

 Java Applets And Its Uses What is an applet in java, and what are its uses? An applet is a software component that enables client-side programming and facilitates text, graphics, audio, imaging, animation and networking, besides live updating and securing two way interaction in web pages. One of the main features of java is the applet .These are usually small in size .Applets are used to embed the code in a web browser and to generate the dynamic contents and its works on the client side .Its response time is very fast . The main features of applets are following: It provides a GUI Facilitates graphics,animation and multimedia. Provides a facility for frames. Enable event handling. Avoid a risk and provides a secure two-way interaction between web pages.  Applet Life cycle: Java applets have a specific programming structure and a specific life cycle that describes how it starts, how it runs, and how it ends. The life cycle consists of five methods: These methods are used ...

Java programs for practice in eclipse IDE

 'For loop' practice code in java Q: What is the 'for loop' in computer programming ? A: A 'for loop' means to execute a block of code for a limited amount of time. Write a Java program to count down 10 times and print HAPPY ONAM on the screen? program package javaproject1; public class ForloopDemo { public static void main(String args []) { for ( int i =10; i >=0; i --){ System. out .println( i ); } System. out .println( "HAPPY ONAM" ); } } Eclipse output

Try catch-(exception handling in java)

 Exception handling in java with examples program Exception handling in java  with eclipse IDE example program and its output program1 package javaproject1; public class ExceptionDemo { public static void main(String[] args ) { String[] fruit_array = { "apple" , "orange" , "grapes" }; System. out .println( fruit_array [2]); System. out .println( fruit_array [3]); System. out .println( fruit_array [1]); } } program 1 output Listen to the program 1, line number 9,10,11. line 9 no error Line 10 an error occurred Therefore the rest of the statement is not executed(line 11) Let's see how the error occurred and how to fix it. In our program the array length is three. Array values are arranged starting from zero index. Let's see how the array values are arranged in this program starting from zero index. fruit_array[0]-->apple in zeroth position fruit_array[1]-->orange in first position fruit...

Method overriding in java example program

 Java programs for practice in eclipse IDE Method overriding in java example program eclipse IDE package javaproject1; class college { public void move() { System. out .println( "College is open" ); } } class University extends college { public void move() { System. out .println( "University is open today" ); super .move(); } } public class Student { public static void main(String args []) { University university = new University(); university .move(); } } short explanation of method overriding

Method overloading in java program

 Method overloading in java example program using eclipse IDE Method overloading in java real time example program using eclipse IDE package javaproject1; class MethodOverloading { public static void main(String args []) { int result1 = add (25,25); int result2 = add (25,25,50); System. out .println( "Result of two integer value is stored in result1 :" + result1 ); System. out .println( "Result of three integer value is stored in result2 :" + result2 ); } static int add( int num1 , int num2 ) { return num1 + num2 ; } static int add( int num1 , int num2 , int num3 ) { return num1 + num2 + num3 ; } } short explanation of  static key word in java short explanation of methods in java 

Program for java constructor overloading

 Example program for constructor overloading in java using eclipse IDE constructor overloading in java-example program package javaproject1; class Pudding { String ingreidents1 ; String ingreidents2 ; String ingreidents3 ; String ingreidents4 ; Pudding(String inds1 ,String inds2 ) { this . ingreidents1 = inds1 ; this . ingreidents2 = inds2 ; } Pudding(String inds1 ,String inds2 ,String inds3 ,String inds4 ) { this . ingreidents1 = inds1 ; this . ingreidents2 = inds2 ; this . ingreidents3 = inds3 ; this . ingreidents4 = inds4 ; } } class Constructor { public static void main(String args []) { Pudding pudding1 = new Pudding( "coconutmilk" , "sugar" ); Pudding pudding2 = new Pudding( "bread" , "sugar" , "custard" , "butter" ); System. out .println( "Gelatin is an ingredient that sets the pudding" ); System. out .pri...