Page not found
Search results
Enhanced for loop in Java
Enhanced for loop in Java is better when scanning a complete array instead of using a for loop. Its ... array_name is the name of an array. Enhanced for loop Java program class EnhancedForLoop { public static ...
devyog - 05/12/2019 - 00:09
Exception handling in Java
Java exception handling: we learn how to handle exceptions in Java with the help of suitable examples. Exceptions are errors that occur when a program executes. At compile time, syntax and semantics checking is done, and ...
devyog - 04/12/2019 - 21:33
Reverse a string in Java
Java program to reverse a string that a user inputs. The charAt method is used to ... = window.adsbygoogle || []).push({}); Java program to reverse a string import java.util.* ; ...
devyog - 05/12/2019 - 00:42
Pascal triangle in C
C program to print the Pascal triangle that you might have studied while studying ... || []).push({}); Pascal triangle program in C language #include <stdio.h> long factorial ( int ) ; int main ( ) { ...
devyog - 09/10/2020 - 23:22
Armstrong number in C
Armstrong number C program to check whether a number is an Armstrong number or not, it's a number ... numbers . We will consider base ten numbers in our program. The algorithm to do this is: First, we calculate the number of digits in our program and then compute the sum of individual digits raise to the power number ...
devyog - 12/12/2019 - 21:06
Java program to open Notepad
Java program to open Notepad, it's a text editor installed in the Windows operating ... used for creating and editing text files. You may be writing Java programs in it, but you can also open it from your Java program. How ...
devyog - 05/12/2019 - 20:46
Java program to get IP address
Java program to print the IP (Internet Protocol) address of a computer system, we use InetAddress class of java.net package, the getLocalHost method returns InetAddress object, which ...
devyog - 05/12/2019 - 19:57
Sum of n natural numbers in C
C program to find the sum of n natural numbers using the formula and a for loop . ... Sum of first n natural numbers = n*(n+1)/2. C program to find sum of n natural numbers #include <stdio.h> ...
devyog - 04/11/2020 - 14:18
C program to count number of vowels in a string
C program to count number of vowels in a string: for example, in the string "love," there are two vowels, 'o' and 'e,'. In the program, both lower-case and upper-case are considered, i.e., 'a,' A,' 'e,' 'E,' 'i', 'I,' 'o,' O,' 'u', and 'U'. In this program, we check every character in the input string. If it's a vowel, the ...
devyog - 26/05/2024 - 13:55
Using multiple classes in a Java program
A Java program may contain any number of classes. The following program comprises of ... || []).push({}); Using two classes in Java program class Computer { Computer ( ) { ...
devyog - 04/12/2019 - 20:24