Generate, edit, refactor, and review Java source code according to the Google Java Style Guide. Use when Codex is asked to write Java code, update .java files, format Java snippets, review Java style, or keep Java output compliant with Google style conventions for file structure, imports, formatting, naming, comments, programming practices, and Javadoc.
72
90%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Passed
No known issues
Source: Google Java Style Guide, https://google.github.io/styleguide/javaguide.html
Use this checklist when generating, editing, formatting, or reviewing Java code. It summarizes the enforceable rules most likely to affect Codex output; consult the source guide for edge cases.
.java.module-info.java.if, else, for, do, and while, even for empty or single-statement bodies.{} or normal block form, except do not use concise empty blocks in multi-block statements such as try/catch or if/else.., ::, & in type bounds, and | in catch alternatives.(.if, for, and catch and a following (;else or catch and a preceding };{, except in annotation array values and compact array initializers;&, and catch alternative |;,, :, ;, and a cast closing parenthesis;. or ::.for loop header.String[] args, not String args[].default when needed.// fall through.TODO: <tracked-context> - <explanation> when a TODO is necessary.public protected private abstract default static final sealed non-sealed transient volatile synchronized native strictfp.L for long literals.mName, s_name, name_, or kName.UpperCamelCase; test class names end in Test.lowerCamelCase; JUnit test methods may use underscores between logical name parts.UPPER_SNAKE_CASE.static final fields as constants. Mutable collections, mutable elements, arrays with mutable contents, loggers, and non-static finals are not constants.lowerCamelCase.UpperCamelCase followed by T.XmlHttpRequest, newCustomerId, supportsIpv6OnIos.@Override whenever legal, except it may be omitted when the parent method is deprecated.Object.finalize.* line.<p> immediately before the first word of every paragraph after the first.@param, @return, @throws, @deprecated.@.