Your full service technology partner! 
-Collapse +Expand
To/From Code
-Collapse +Expand Cross Ref Guide
-Collapse +Expand Members-Only
Sign in to see member-only pages.
   ► KBTo/From GuidesJava  Print This     

File Extensions (Java and C# Cross Reference Guide)

By Mike Prestwood

Java versus C#: A side by side comparison between Java and C#.

Tool Basics

Developer environment basics such as common file extensions, common keyboard shortcuts, etc.

File Extensions

[Other Languages] 

Languages Focus

Common or primary file extensions used (not a complete list, just the basics).

Java:   .java

The customary primary source file extension for Java code is ".java" which could contain anywhere from a single class to the entire source code.

Other important files:

  • .JAR - Java archive file (compressed code file). Archive that contains multiple Java files and is compressed using .ZIP compression; stores Java classes and metadata and may be digitally signed; runs as a program if the Java Runtime Environment (JRE) is installed on the computer.
  • .CLASS - compiled source code which are platform-independent. If a source file has more than one class, each class is compiled into a separate .class file. These .class files can be loaded by any Java Virtual Machine (JVM).

Common source code file extensions include:

  • .SLN - Solution File. Contains solution specific information such as links to the projects within this solution.
  • .CSPROJ - C# Project File. Contains project specific information. When you add a file containing one or more classes, it is added to this file.
  • .CS - C# source file.
  • .Designer.CS - C# form file (a text resource file).
Syntax Example:
//Sample code snippet from the .csproj project file:
  <Compile Include="Cyborg.cs" />
  <Compile Include="Cyborg600.cs" />
  <Compile Include="Form1.cs">

Sales Website: Or visit our legacy sales site:

©1995-2024 Prestwood IT Solutions.   [Security & Privacy]