Posts

Showing posts from September, 2020

File Handling Concept PHP

Image
File Handling Concepts in PHP Before going to file handling, you need to revise the Simple PHP programs, so click below this link to visit simple PHP programs, Simple PHP programs Part I Simple PHP programs Part II 1. To check that the sentence has Vowel, Alphabets and Words count using file concept <html> <head>   <title>File Handling I</title>   </head>   <body>    <center>   <?php   $file="ex1.txt";   $read=fopen($file,"a+");   $text=file_get_contents("ex1.txt"); $word = str_word_count($text); $length = strlen($text); $vowel = preg_replace("/[aeiou]/i", "", $text); $alpha = preg_replace("/[abcdefghijklmnopqrstuvwxyz]/i","",$text); $vowelcount=($length - strlen($vowel)); $alphacount=($length - strlen($alpha)); echo "<br>The vowels count in the passage is $vowelcount"; echo "<br...

Java Constructors

Java Constructors "Use desktop site in Smart phones to visit our blog in best manner" Before going to java program, if anyone want to execute a Java program in, they will need to install JDK on the system. How to install JDK on the system The link given above will help you to know about how to install JDK on your system 1. Program to implement Constructors import java.io.*; public class ksm1 { &nbsp&nbsp int x,y; &nbsp&nbsp ksm1() &nbsp&nbsp { &nbsp&nbsp&nbsp&nbsp System.out.println("Constructor Exhibited!!!.."); &nbsp&nbsp&nbsp&nbsp x=5; &nbsp&nbsp&nbsp&nbsp y=10; &nbsp&nbsp } &nbsp&nbsppublic static void main(String[] args) &nbsp&nbsp { &nbsp&nbsp&nbsp&nbsp ksm1 s=new ksm1(); &nbsp&nbsp&nbsp&nbsp System.out.println("The value of...