JSP is an integral part of Java EE. If you are giving an interview for a web developer, then having good knowledge of JSP is very important. This post contains a list of 35 JSP interview questions with answers. Please make sure to bookmark it because I will be kept on adding more to...
We can convert a Java object to a Stream that is called Serialization. Once an object is converted to Stream, it can be saved to file or send over the network or used in socket connections. The object should implement a Serializable interface and we can use java.io.ObjectOutputStream to ...
the value of the variable can't be written to the stream instead when the class is retrieved from the ObjectStream the value of the variable becomes null.
logEntries .stream() .sorted((a, b) -> a.getLength() - b.getLength()) .map(logEntry -> logEntry.toString()) .collect(Collectors.joining("\n"))To determine the average percentage watched:logEntries .stream() .mapToDouble(logEntry -> (double) logEntry.getWatched() / logEntry.getLength(...
Another good Java interview question, I think answer is not sufficient but here it is “Substring creates new object out of source string by taking a portion of original string”. see my post How SubString works in Java for detailed answer of this Java question. ...
An object is deserialized by reading it from an ObjectInputStream.Back to Top13. When to use Runnable interface Vs Thread class in Java?If we need our class to extend some other classes other than the thread then we can go with the runnable interface because in java we can extend only ...
Since there is a byte stream, why should there be a character stream? The essence of the question wants to ask:whether it is file reading or writing or network transmission and reception, the smallest storage unit of information is bytes, so why are I/O stream operations divided into byte...
2.如何在Java中创建线程?回答:有两种方式可以创建线程:继承Thread类或实现Runnable接口。代码示例:// ...
断路器 | 不完善 | Spring Cloud Netflix Hystrix | 服务网关 | 无 | Spring Cloud Netflix Gateway | 分布式配置 | 无 | Spring Cloud Config | 服务跟踪 | 无 | Spring Cloud Sleuth | 消息总线 | 无 | Spring Cloud Bus | 数据流 | 无 | Spring Cloud Stream | 批量任务 | 无 | Spring Cloud...
210 . What is a stream? 211 . Explain about streams with an example? what are intermediate operations in streams? 212 . What are terminal operations in streams? 213 . What are method references? 214 . What are lambda expressions?