Profile Get link Facebook X Pinterest Email Other Apps September 03, 2024 Full Name: [P.MANIKANDAN]Date of Birth: [22/09/2002]Gender: [Male]Address: [5/51B Mela street , Natchiyar koil, Tamilnadu, 612 602]Phone Number: [7339347768]Email Address: [nkmani2209@gmail.com] Get link Facebook X Pinterest Email Other Apps Comments
Product calculation June 23, 2024 import java.util.Scanner; public class ProductDetails { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); // Prompt for product name System.out.print("P-Name: "); String productName = scanner.nextLine(); // Prompt for quantity System.out.print("Qty: "); int quantity = scanner.nextInt(); // Prompt for price System.out.print("Price: "); double price = scanner.nextDouble(); // Prompt for tax percentage System.out.print("Tax (%): "); double tax = scanner.nextDouble(); // Calculate tax amount double taxAmount = (tax / 100) * pr... Read more
P.MANIKANDAN,P23CS383 July 21, 2024 import java.io.*; import java.nio.file.*; import java.util.List; import java.util.stream.Collectors; public class AFO{ // Read file content public static void readFile(String filePath) throws IOException { List<String> lines = Files.readAllLines(Paths.get(filePath)); for (String line : lines) { System.out.println(line); } } // Write content to a file public static void writeFile(String filePath, String content) throws IOException { Files.write(Paths.get(filePath), content.getBytes(), StandardOpenOption.CREATE, StandardOpenOption.APPEND); } // Copy a file public static void copyFile(String sourcePath, String destinationPath) throws IOException { Files.copy(Paths.get(sourcePath), Paths.ge... Read more
Comments
Post a Comment