Posts

Showing posts from August, 2017

Displaying Text in a Dialog Box

Image
In this program, will we be showing you how to use JAVA program to display a text using JAVA GUI (Graphics User Interface) in a dialog box. Typically,dialog boxes are windows in which programs display important messages to the user of the program.  This application uses Java's Class JOptionPane which provides prepackaged dialog boxes that enables programs to display windows containing messages to its user. we will be using the  import  javax.swing. JOptionPane which  is an import declaration and is part of the  Java API .  Programmers use import declarations to identify the predefined classes used in Java Program. The import declaration help the compiler locate the classes you intend to use, this tells the compiler that our program uses class JOptionPane from package javax.swing and this package helps programmers create graphical user interfaces (GUI) for applications. The program below illustrates how to create a text in a dialog box...

Printing Your First Java Program

Image
Every programmer first code or writing starts with words like "Hello World", "Am a Programmer" etc, that's what makes programming so fun and interesting in a way that the programmer would one day be writing millions of lines of codes. But before you start writing thousands and millions of codes we have to start from somewhere and that is why this post is very essential to beginners new to coding.  We will be demonstrating how to write "Welcome to Java programming" in a Java language. Java language is one of the most widely used high level programming languages for developing complex and high end applications that can be run on all platforms. thus; its platform independent.  To get started with Java, I recommend using DrJava which is a lightweight development environment for writing Java programs. It is designed primarily for students, providing an intuitive interface and the ability to interactively evaluate Java code. It also incl...

Printing Your First C++ Program

Image
Welcome to C++ If you are here, it means you have taken a very big step to a very lucrative journey ahead to become one of those with super powers of coding, and what better way to start than with C++ I won't bore you with much talk cause this blog is all about codes and codes, but before you start coding in C++ you require an IDE (Integrated Device Environment) which will assist you in writing and running your C++ programs. I would recommend   Code::Blocks with gnu gcc compiler (Which supports C programming Language too), which is the best compiler to start  with for beginners and which i like using most.  To make use of the IDE, install and open the code blocks,  Write the  C++  code and save the file with . cpp  extension. To save the file, go to File > Save (Shortcut: Ctrl + S). To run the program, go to Build > Build and Run. Now let's go ahead with what brought you here which is  writing your first C++ code. The code below...

Printing Your First C Program

Image
Welcome to C If you are here, it means you have taken a very big step to a very lucrative journey ahead to become one of those with super powers of coding, and what better way to start than with C To get started with C you need an IDE. Install the Code::Blocks with gnu gcc compiler, which is the best compiler to start  with for beginners. Write the  C  code and save the file with . c  extension. To save the file, go to File > Save (Shortcut: Ctrl + S). To run the program, go to Build > Build and Run. Now let's go ahead with what brought you here which is  writing your first C++ code.  The code below illustrates just how to do that. This application displays a line of text in a Command prompt using an IDE   #include <stdio.h>   int main( void )   { printf( "Welcome to C!\n" );   } see also Printing Your First C++ Program