concept Java code in category graphs
appears as: Java code, Java code

This is an excerpt from Manning's book Neo4j in Action.
You can write Java code that creates the graph in figure 3.7. The first two listings (3.1 and 3.2) create a single user node, using both the Java 6 (Neo4j 1.9.X) and Java 7 (Neo4j 2.0.X) idiomatic styles.
In chapter 4, when we discussed the Neo4j Traversal API, we demonstrated how to find all the movies a user has seen using Java code. As a reminder, the following listing shows the Java code used.
There are a number of ways you can execute Cypher queries. Neo4j ships with a couple of tools that support Cypher executions, and Cypher can also be executed from Java code, much like SQL. Table 6.1 shows the Cypher execution options.