Which method you will use to create a new file to store some log data. Each time a new log entry is necessary, write string to the file in java ?
Answer / Mayank Rastogi
In Java, you can create a new file using `FileOutputStream` and write strings into it using various methods like `println()`, `write()`, or `print()`. For logging purposes, consider using Log4j, Slf4j, or java.util.logging.
| Is This Answer Correct ? | 0 Yes | 0 No |
What are three types of loops in java?
What is the difference between this() and super() in java?
What are the override methods in Object class?
2 Answers Tech Mahindra, Wipro,
How to provide security in java
1 Answers Infosys, TCS, Tech Mahindra,
Is string thread safe in java?
Why webdriver is an interface?
What happens if an exception is not caught?
how many access specifiers are available in java
Can we assign the reference to this variable?
What is persistence ?
What is illegal identifier in java?
Which java ide is used the most?