1. What is an IDE?
An IDE (Integrated Development Environment) is software that combines tools like a code
editor, debugger, and compiler for easier coding.
Examples: Visual Studio, NetBeans.
2. What is the Solution Explorer in Visual Studio?
It’s a window that displays all files, classes, and resources in a project/solution.
3. What is the Toolbox used for in Visual Studio?
It provides GUI controls (buttons, labels) for drag-and-drop design in Windows Forms.
4. What is a Project vs. a Solution?
A project is a single application. A solution is a container that holds one or more related
projects.
5. What is a breakpoint?
A breakpoint pauses code execution to allow debugging at a specific line.
6. What is debugging?
Debugging is the process of identifying and fixing errors in code.
7. What is compiling?
Compiling converts human-readable code into machine language or intermediate code.
8. What is IntelliSense?
A code-completion tool in Visual Studio that suggests methods, variables, and classes.
9. What is a .sln file?
A solution file in Visual Studio that groups multiple projects together.
10. What is a .cs file?
A C# source code file.
11. What is .designer.cs?
A file in Windows Forms containing auto-generated code for the GUI layout.
12. What is GUI?
Graphical User Interface, the visual part of an app that users interact with.
13. What is Swing in Java?
A GUI toolkit in Java used for creating windows, buttons, labels, etc.
14. What is JFrame?
A top-level container in Java Swing that represents a window.
15. What is JOptionPane?
A Java Swing class used to show dialog boxes like messages or confirmations.
16. What is event handling?
Code that runs in response to actions like button clicks.
17. What is ActionListener?
A Java interface used to handle events like button clicks.
18. What is Windows Forms?
A GUI framework in .NET for building Windows desktop applications.
19. What is WPF?
Windows Presentation Foundation: a newer .NET GUI framework with more features than
Windows Forms.
20. What is a Console Application?
A text-based program that runs in the terminal window.
21. What is N-tier architecture?
A software architecture model with multiple layers (UI, Logic, Data).
22. What is a cross-platform IDE?
An IDE that works on multiple operating systems (e.g., NetBeans, VS Code).
23. What is JIT (Just-In-Time) compilation?
A process where code is compiled at runtime for performance optimization.
24. What is the Properties Window?
A pane in both IDEs used to edit properties (text, color, size) of UI elements.
25. What is the Output Window used for?
To display messages from the compiler and runtime (errors, logs, build success).
✅ SECTION B: Comparisons & Theory (26–50)
26. Compare Visual Studio and NetBeans.
VS: For C#, VB.NET. Developed by Microsoft.
NetBeans: For Java. Open-source. Developed by Apache.
27. Windows Forms vs Swing?
Windows Forms: .NET-based, simple GUI.
Swing: Java-based, platform-independent GUI.
28. Console App vs GUI App?
Console: Text interface. GUI: Graphical (buttons, labels, etc.).
29. Advantages of IDEs?
1. Auto-complete
2. Debugging
3. Code templates
4. GUI builders
30. Disadvantages of drag-and-drop GUI?
1. Less control over code
2. Can become messy
3. Slower for advanced customization
31. Compile-time vs Runtime errors?
Compile-time: Found during compilation (e.g., syntax errors).
Runtime: Found while program is running (e.g., divide by zero).
32. Visual Studio vs Online editors?
VS is more powerful with debugging, GUI tools; online editors are lighter and accessible from
anywhere.
33. IntelliSense benefits?
Saves time, reduces typos, and improves productivity.
34. MessageBox vs JOptionPane?
MessageBox: C# (Windows Forms).
JOptionPane: Java Swing.
35. Advantages of modular projects?
Easier maintenance, testing, and reusability.
36. Why use breakpoints?
To test parts of code by pausing execution and inspecting variables.
37. C# vs Java syntax difference?
C# uses Console.WriteLine, Java uses System.out.println.
38. Solution Explorer vs Projects Window?
Solution Explorer: Visual Studio. Projects Window: NetBeans. Both manage files and classes.
39. WPF vs Windows Forms?
WPF is newer, uses XAML for UI, and has better graphics.
40. Java SE vs Java EE?
SE: Standard Edition (core Java). EE: Enterprise Edition (web and server-side apps).
41. What is event-driven programming?
A programming style where code reacts to user actions.
42. Early vs Late Binding?
Early: Determined at compile time. Late: Determined at runtime (like with interfaces).
43. Controls vs Containers?
Controls: UI elements (Button, Label).
Containers: Hold and organize controls (Panel, GroupBox).
44. Static vs Instance method?
Static belongs to class, instance requires an object.
45. CLR vs JVM?
CLR: C# runtime. JVM: Java Virtual Machine.
46. Cross-language development in Visual Studio?
You can use C#, VB.NET, F#, etc., in the same solution.
47. Open-source vs Proprietary IDEs?
Open-source (NetBeans): Free to use.
Proprietary (VS): Licensed, more advanced features.
48. Code-behind vs Inline event code?
Code-behind is cleaner; inline mixes logic and layout.
49. VB.NET vs C#?
Both run on .NET, but C# is more popular; VB is more beginner-friendly.
50. NetBeans vs Eclipse?
NetBeans is simpler and has built-in GUI tools. Eclipse is more customizable.
✅ SECTION C: Project & Workflow (51–75)
⸻
51. Steps to create C# Console App:
Open VS → New Project → Console App → Name → Create.
52. Create Windows Forms App:
VS → New Project → Windows Forms App → Name → Create → Design UI.
53. Add button in Windows Forms:
Drag from Toolbox → Drop on Form.
54. Add event to button:
Double-click button → Code editor opens → Write code in button1_Click.
55. Create Java project in NetBeans:
File → New Project → Java > Java Application → Name it → Finish.
56. Add JFrame Form:
Right-click Project → New > JFrame Form.
57. Add JButton:
Drag from Palette → Drop on JFrame.
58. Create ActionPerformed method:
Right-click JButton → Events > Action > actionPerformed.
59. Add JLabel:
Drag from Palette to JFrame.
60. Run Project:
Click green triangle “Run” button or press F6.
61. Stop Running App:
Click Stop button or close terminal.
62. Clean and Rebuild:
NetBeans: Build > Clean and Build Project.
VS: Build > Rebuild Solution.
63. Build configuration:
Sets whether app builds in Debug or Release mode.
64. Deploy Windows App:
Use Publish Wizard or create installer.
65. Package Java app as JAR:
Clean & Build → dist folder → .jar file appears.
66. Organize into packages:
Right-click → New Package → Move classes in.
67. Rename class in IDE:
Right-click class → Refactor > Rename.
68. Search symbol:
Ctrl + F or Navigate > Go to Symbol.
69. Refactor method:
Right-click method → Refactor > Rename.
70. Comment/uncomment code:
C#: // or Ctrl + K, C.
Java: // or Ctrl + /.
71. Use code snippets:
C#: type prop + Tab → Auto-generate property.
72. Change form properties:
Select form → Edit properties in Properties Window.
73. Navigator Window:
Shows all classes, methods, and members in Java.
74. View class hierarchy:
Right-click class → Show Hierarchy.
75. Change IDE theme:
Tools > Options > Appearance (NetBeans), or Tools > Themes (VS).
✅ SECTION D: Debugging (76–90)
76. Set breakpoint:
Click left margin or press F9.
77. Step Over:
Executes current line and skips inside methods.
78. Step Into:
Goes inside method line-by-line.
79. Step Out:
Exits current method to calling one.
80. Inspect variable:
Hover mouse or use Watch window.
81. Watch Window:
Manually track variable values.
82. Immediate Window:
Run quick code/test expressions.
83. Catch exceptions:
Use try-catch block.
84. Syntax error example:
Missing ; or wrong keyword.
85. Handle NullReferenceException (C#):
Check for null before accessing objects.
86. Handle ArrayIndexOutOfBounds (Java):
Ensure index is within array length.
COS113 – All Possible Exam Questions & Answers
Covering: Visual Studio | Java NetBeans | C# | Java | GUI | Debugging | IDE Workflow
🔹 A. DEFINITIONS & BASIC CONCEPTS
1. What is an IDE?
An Integrated Development Environment (IDE) is software that provides tools like a code editor,
compiler, debugger, and GUI builder in one place.
Examples: Visual Studio, NetBeans.
2. What is Visual Studio?
A powerful IDE developed by Microsoft used for creating applications with C#, VB.NET, and C+
+.
3. What is Java NetBeans?
An open-source IDE used mainly for developing Java applications, including GUI and web-
based projects.
4. What is a Project in Visual Studio?
A set of files that build into a single application, like a Windows Forms app or Console app.
5. What is a Solution in Visual Studio?
A container that can hold one or more related projects.
6. What is a JFrame in Java?
It’s a top-level container used to create GUI windows in Java Swing.
7. What is a JButton?
A clickable button in Java Swing.
8. What is a MessageBox in Visual Studio?
A pop-up window that shows messages, using MessageBox.Show() in C#.
9. What is JOptionPane in Java?
A class in Swing used to create dialog boxes for messages and input.
10. What is debugging?
The process of identifying and fixing errors in a program.
⸻
🔹 B. WORKFLOW & IDE USAGE
11. Steps to create a C# Windows Forms app in Visual Studio:
1. Open Visual Studio
2. Create new project → Windows Forms App
3. Design your UI using Toolbox
4. Add code behind buttons
5. Build and Run
12. Steps to create a Java GUI App in NetBeans:
1. Open NetBeans
2. Create new Java Application
3. Add a JFrame Form
4. Use Palette to drag buttons and labels
5. Add event logic with actionPerformed()
6. Run the project
13. How to attach a click event to a button in Visual Studio?
Double-click the button → it opens button_Click() method → write your logic inside.
14. How to attach a click event to a button in NetBeans?
Right-click button → Events → Action → actionPerformed.
51. What keyword is used to define a class in Java?
Answer: class
52. What keyword starts the main method in Java?
Answer: public static void main(String[] args)
53. What access modifier allows code to be used anywhere?
Answer: public
54. What keyword is used to display output in C# console?
Answer: Console.WriteLine();
55. What keyword is used to display output in Java?
Answer: System.out.println();
56. How do you create a form in Visual Studio?
Answer: Add a new Windows Form via the Solution Explorer.
57. How do you create a JFrame in NetBeans?
Answer: Right-click on the project → New → JFrame Form.
58. What method runs automatically when a GUI button is clicked in NetBeans?
Answer: actionPerformed()
59. What symbol is used to add comments in C# and Java?
Answer: // for single line, /* */ for multi-line
60. What is a variable?
Answer: A container used to store data (e.g., int age = 25;)
61. Declare an integer variable in Java.
Answer: int age = 20;
62. Declare a string variable in C#.
Answer: string name = "Czar";
63. What is an array?
Answer: A collection of similar data elements stored under one name.
64. Declare a Java array of 5 integers.
Answer: int[] numbers = new int[5];
65. Declare a string array in C#
Answer: string[] names = new string[3];
66. What is typecasting?
Answer: Converting one data type into another.
67. Give an example of typecasting in Java.
Answer: int x = (int) 5.7;
68. What does IDE stand for?
Answer: Integrated Development Environment
71–85: MULTIPLE CHOICE STYLE QUESTIONS
71. Which of the following is used to create GUIs in Java?
A. ASP.NET
B. Swing
C. Flask
D. Node.js
72. Which of these is not a C# data type?
A. int
B. string
C. bool
D. charz
73. Visual Studio is a product of:
A. Oracle
B. Microsoft
C. Google
D. Apache
74. NetBeans is mainly used for which programming language?
A. Python
B. Java
C. C++
D. Swift
75. Which method is entry point for C# programs?
A. static()
B. Main()
C. Start()
D. Begin()
76. Which of these shows a message box in C#?
A. Message.Show()
B. MessageBox.Display()
C. MessageBox.Show()
D. Alert.Show()
77. Which GUI component lets you enter text?
A. Label
B. TextBox
C. Button
D. Table
78. What is the output of System.out.println(4 + 3)?
A. 43
B. 7
C. 34
D. Error
79. How do you start a comment in C#?
A. /*
B. --
C. //
D. ##
80. Which one is a Java data type?
A. word
B. integer
C. double
D. text
81. What is used to handle errors in Java?
A. protect
B. try-catch
C. error-catch
D. throw-only
82. What window shows errors in NetBeans?
A. Palette
B. Output
C. Designer
D. Navigator
83. Which is not part of Visual Studio?
A. Toolbox
B. Solution Explorer
C. Navigator
D. Properties
84. What is a .sln file?
A. Java class
B. Project
C. Solution File
D. HTML file
85. What does GUI stand for?
Answer: Graphical User Interface ✅
🔹 86–100: MIXED THEORY & SHORT ANSWERS
86. Explain the difference between JTextField and JLabel.
• JTextField allows user input.
• JLabel only displays text.
87. What is a constructor?
A special method used to initialize objects.
89. Why is public static void main required?
It makes the method accessible without object creation and serves as the entry point.
90. What is an event in GUI?
An action like click, key press, or mouse movement.
91. What is the significance of the this keyword?
Refers to the current object.
92. Define Encapsulation.
Wrapping of data and methods in a class; hides implementation.
93. Give a real-world example of abstraction.
Driving a car – we use the steering wheel without knowing the engine’s internal workings.
94. What are logical operators?
Operators like &&, ||, ! used in decision-making.
95. What is a loop?
A structure that repeats a block of code multiple times.
96. Name any 2 loop types.
• for loop
• while loop
99. What is a method?
A reusable block of code that performs a task.
100. Why is learning IDEs important in programming?
Because they increase productivity with tools like debugging, auto-suggestions, GUI builders,
and project management.
✅ COS113 EXAM QUESTIONS & ANSWERS
(101–150) — Definitions, Theory, Practical & Comparison-Based
🔹 101–115: DEFINITIONS
101. Define IDE.
Answer: An IDE (Integrated Development Environment) is software that provides facilities
like writing, editing, compiling, debugging, and running programs.
102. Define Variable.
Answer: A variable is a named location in memory used to store data.
103. Define Class.
Answer: A class is a blueprint for creating objects that defines variables and methods.
104. Define Object.
Answer: An object is an instance of a class.
105. Define Method.
Answer: A method is a function defined inside a class that performs an action.
106. Define Constructor.
Answer: A constructor is a special method called automatically when an object is
created.
107. Define GUI.
Answer: GUI (Graphical User Interface) allows users to interact with software using
graphical components like buttons and forms.
108. Define Component.
Answer: A component is a visual control like a button, label, or text field used in GUI
design.
109. Define Event.
Answer: An event is an action (like click or keypress) that a program can respond to.
110. Define Loop.
Answer: A loop is a control structure used to repeat a block of code multiple times.
111. Define Condition.
Answer: A condition is a logical test that returns true or false and controls flow in
decision-making.
112. Define IDE Debugging.
Answer: Debugging is the process of finding and fixing errors in a program using tools
like breakpoints.
113. Define Breakpoint.
Answer: A breakpoint pauses program execution at a specific line to inspect variables
and code flow.
114. Define Package (Java).
Answer: A package is a group of related Java classes.
115. Define Namespace (C#).
Answer: A namespace is a container that holds classes, methods, and other namespaces
to avoid name conflicts.
🔹 116–130: THEORY QUESTIONS
116. State 3 features of Visual Studio.
Answer: IntelliSense, GUI Designer, Debugger
117. State 3 features of Java NetBeans.
Answer: Drag-and-drop GUI, Code completion, Ant-based project structure
118. Compare Java and C# (2 differences).
Answer:
• Java runs on JVM, C# runs on CLR.
• Java uses NetBeans/Eclipse, C# uses Visual Studio.
119. Mention 2 GUI components in NetBeans.
Answer: JButton, JTextField
120. Mention 2 GUI components in Visual Studio.
Answer: Button, TextBox
121. What is IntelliSense?
Answer: A code completion feature in Visual Studio that suggests variables, functions,
etc.
122. What is the main use of the Toolbox in Visual Studio?
Answer: To drag and drop GUI elements onto a form.
123. List 3 programming languages supported by Visual Studio.
Answer: C#, VB.NET, C++
124. What language does NetBeans primarily support?
Answer: Java
125. Explain how to add a button in NetBeans GUI.
Answer: Use the Palette panel → drag JButton onto JFrame.
126. What is Properties Window used for?
Answer: To change settings of GUI components like name, text, color.
127. State 3 examples of event-driven programming.
Answer: Button click, mouse hover, key press
128. What is a dialog box?
Answer: A small window that prompts the user to enter information or shows a message.
129. What is the difference between System.out.println() and System.out.print()?
Answer: println adds a new line after output; print does not.
130. What is the purpose of Main() method?
Answer: It serves as the program’s entry point.
🔹 131–145: PRACTICAL CONCEPTS
131. Create a C# variable to store a name.
Answer: string name = "Czar";
132. Create a Java variable to store age.
Answer: int age = 20;
141. Write code to get text from a JTextField.
Answer: String name = jTextField1.getText();
142. Write code to display result in a JLabel.
Answer: jLabel1.setText("Result");
143. How do you exit a program in Java?
Answer: System.exit(0);
144. What does this refer to in Java?
Answer: The current instance of the class.
145. What does MessageBox.Show("Hi") do in C#?
Answer: Displays a dialog with “Hi”.
🔹 146–150: BONUS REVISION
146. Full meaning of JDK?
Answer: Java Development Kit
147. Full meaning of CLR?
Answer: Common Language Runtime
148. What is Design View in an IDE?
Answer: A visual interface where developers build GUI by dragging controls.
149. Difference between compile time and run time?
Answer: Compile time is when code is converted to executable; run time is when
program is running.
150. Why is NetBeans important for Java beginners?
Answer: It simplifies coding with auto-complete, GUI tools, and easy project
management.