In Apex, inline comments are used to add explanatory notes to a single line of code. They are created using two forward slashes //. Anything following // on the same line is ignored by the compiler.
// This is an inline comment String welcomeMessage = 'Hello, World!'; // This comment explains the variable
Sign up to track your progress, earn points, and compete with others. Your solutions will be saved automatically.
Create account