A program that accepts an employee’s ID, total worked hours in a month and the amount he received per hour. Print the ID and salary (with two decimal places) of the employee for a particular month.

Here, we have a basic program example to print the id and monthly salary of the employee using different languages. This program is created in c language, c++, Java, and Python. Program to print id and monthly salary of the employee in C language Program to print id and monthly salary of the employee in…

Read More »

A program in Java to check if a file or directory has read and write permission or not.

In the Java program to check if a file or directory has read and write permission or not, we need to import java.io.file library first which contains all the built-in functions than can check the rights to access of a file. Sample Output: /Desktop/sample.txt cannot write. /Desktop/sample.txt cannot read. Kritika Papnewww.codermantra.com/

Read More »

A program in Java to replace all the vowels in a string with a specified character.

In the above Java program to replace all the vowels in a string with a specified character we created a function named validate() and then with the help of a built-in function “replaceAll”, replaced the vowel with passed string. Sample Output: Input the string: lazy frog Original string: lazy frog After replacing vowel(s) with specified…

Read More »