0% found this document useful (0 votes)
26 views

Experiment 1 - Introduction To OOPII (Java)

This document provides instructions for an experiment in an Object Oriented Programming II (Java) lab. Students are asked to install NetBeans IDE to create a Java file and write two programs. The first displays messages using print, println and printf functions, and the second prints a pattern of symbols. Key details about formatting in printf are also provided.

Uploaded by

Bonaya Keme
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Experiment 1 - Introduction To OOPII (Java)

This document provides instructions for an experiment in an Object Oriented Programming II (Java) lab. Students are asked to install NetBeans IDE to create a Java file and write two programs. The first displays messages using print, println and printf functions, and the second prints a pattern of symbols. Key details about formatting in printf are also provided.

Uploaded by

Bonaya Keme
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Second Year - 1st Semester OOPII (Java) Lab.

Experiment 1 - Introduction to OOPII (Java)

Objective:

To get familiar with NetBeans IDE.

Procedure:

1. Install NetBeans IDE.


2. Create a new java file (i.e. exp1.java) by following these steps:
Open NetBeans IDE File New Project Java Application Next
Project Name (exp1) Finish

1
Second Year - 1st Semester OOPII (Java) Lab.

Exp1: Write a Java program to display different messages on screen using


(print, println, and printf) functions.

The run of this program is:

Note: In printf, there are several formats like:

 s – formats strings
 c – formats character
 d – formats decimal integers
 f – formats the floating-point numbers

2
Second Year - 1st Semester OOPII (Java) Lab.

Exp2: Write a Java program to display the following:

*
&&&
%%%%%
$$$
@

The run of this program is:

You might also like