Home » Author Archives: Mary Zheng

Author Archives: Mary Zheng

Mary Zheng
Mary has graduated from Mechanical Engineering department at ShangHai JiaoTong University. She also holds a Master degree in Computer Science from Webster University. During her studies she has been involved with a large number of projects ranging from programming and software engineering. She works as a senior Software Engineer in the telecommunications sector where she acts as a leader and works with others to design, implement, and monitor the software solution.

Java 8 Check if Array Contains a Certain Value Example

1. Introduction An array is a data structure which holds a fixed number of values of a single type. In this example, I will demonstrate how to check if an array contains a certain value in three ways: Convert an array to a Collection and check with the contains method Use Arrays.binarySearch to check when the array is sorted Convert an array ...

Read More »

Java 8 Convert String to Char Array Example

1. Introduction The Java String class represents character strings. An array is a data structure which holds a fixed number of values of a single type. The char type is a primitive type which represents a single 16-bit Unicode character. It has a minimum value of '\u0000' (or 0) and a maximum value of '\uffff' (or 65535 inclusive). The Character class wraps thechar type as a value in an object. An object ...

Read More »

Java 8 Add Days to Current Date Example

1. Introduction Java 8 added a new set of packages to provide a comprehensive date-time model. Java 8 Date-Time API is a JSR-310 implementation. In this example, I will use classes from the java.time and java.time.format packages to demonstrate how to add days to the current date. java.time is the base package which includes a set of date-time classes: LocalDate, LocalDateTime, Instant, Period, Duration, Clock, ZonedDateTime, ...

Read More »

Java 8 Join Arrays Example

1. Introduction An Array is a data structure which holds a fixed number of objects with the same type. Joining Arrays is to combine two arrays into one. Java 8 enhances Collection by providing a new Stream interface. A stream is not a data structure, instead it is created from Collection, Array, or I/O channels. Java 8 provides a Stream interface which contains several methods ...

Read More »

Selenium Web Application Testing Example

1. Introduction In this post, we feature a comprehensive example on Selenium web application testing. A web application is a client-server computer program which the client runs in a web browser. Spring Web model-view-controller (MVC) framework provides an easier way to develop a web application. Spring boot provides auto configuration to simplify the configuration steps. Selenium is a set of software tools ...

Read More »

JAX-WS Logging with Handler Example

1. Introduction In this post, we feature a comprehensive Example on JAX-WS Logging with Handler. Java API for XML Web Services (JAX-WS) is a Java programming language for creating web services, particularly SOAP services. JAX-WS 2.0 specification was introduced in 2005 and has become part of JDK since JDK6. It uses annotations to simplify the development and deployment of web services. It also includes a Handler interface ...

Read More »

Spring Boot SOAP Service with Hibernate Example

1. Introduction Java Persistence API (JPA) is Java’s standard API specification for object-relational mapping. Hibernate is a JPA provider and provides a framework for mapping an object-oriented domain model to a relational database. Spring Boot defines a list of starter projects, in which each project includes a set of default component dependencies and an automatic configuration of components. The Spring Web Service starter project enables developers to ...

Read More »

JAX-WS Client timeout Example

1. Introduction In this post, we feature a comprehensive Example on JAX-WS Client timeout. Java API for XML Web Services ( JAX-WS) specification was introduced in 2005. There are several tools that implement JAX-WS specification: JDK (since version 6), Apache CXF, Apache Axis, JBossWS, IBM WebSphere, and Oracle Weblogic. There are two common timeouts in client-server architecture: Read timeout –  the timeout while waiting for the data ...

Read More »

JAX-WS Tutorial for Beginners

Java API for XML Web Services (JAX-WS) is a Java programming language for creating web services, particularly SOAP services. In this tutorial, we will build a multi-module Maven project to demonstrate how to create, deploy, consume, and test JAX-WS web services. Table Of Contents 1. Introduction 2. A Brief History of Web Services 3. Technologies Used 4. Maven Project 4.1. ...

Read More »

Logback Change Log Level at Runtime Example

1. Introduction In this post, we feature a comprehensive Example on Logback Change Log Level. Logback is one of the most widely used logging frameworks in the Java community. Most applications set the logger level to INFO in the production environment, but sometimes we need more detailed logging messages to troubleshoot issues and would like to change the logger lever at runtime. ...

Read More »