As a beginner in programming I often get confused by what basic elements are required. For programming languages like Oracle, C++, VB, C#, java, and .net, are there any common features and fundamentals from which we can start writing our programs?
First of all, Oracle is not a programming language. It is a relational database management system (RDBMS), in which data can be accessed using the Structured Query Language (SQL). You don't write programs in SQL; you write queries, program statements that are constructed as strings in a program written in another language, and then sent to the RDBMS using an appropriate library of functions, which return the resulting set of records.
.NET is also not a programming language. It is a "framework", meaning a set of software libraries libraries and a means to provide ineroperability among several programming languages that Microsoft provides. You can write .NET programs in C++, C#, or VB; you can write .NET programs using a mix of C++, C# and VB (or any other language that the framework supports.)
C++, VB, C# and Java are programming languages. By "basic elements", I presume you mean the minimum "scaffolding" needed to produce a working program. The answer is, very little. Kernighan and Ritchie began their classic book on the C language with the infamous Hello, World example. In current C/C++ style:
#include
int main(int argc, void *argv[])
{
printf("Hello, World!\n");
return 0;
}
This is a working C/C++ program. On a Windows machine with Visual Studio, you can compile it from the Visual Studio command prompt using the command "CL HELLO.C" (assuming you named the source file "HELLO.C"). On a Linux/UNIX machine with the gcc compiler you might write "cc hello.c -o hello".
Similar examples exist in VB, C#, Java, and many other programming languages.
These examples demonstrate the minimum needed to get a working program. However, they are not very practical unless your goal is to write a command-line application. If you want to write an application that communicates with the user through a graphical interface, the best thing is to find a source code example that is similar in appearance to what you are trying to do. Learn how to compile and build the application using the development environment that you wish to use. Once you are familiar with the basic steps of compiling and building, start making small changes to the code, to see if you can make it do what you want. Don't start with a big project; start with something small and simple, so you can fully understand every element of the code.
Just in case you are interested, here are the equivalents of the above example in VB, C# and Java. First, in VB (compile using "VBC HELLO.VB" from the Visual Studio command prompt):
Module Hello
Sub Main()
Console.WriteLine("Hello, VB World!")
End Sub
End Module
Next, in C# (compile using "CSC HELLO.CS"):
using System;
namespace HELLO
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello, C# World!");
}
}
}
Finally, in Java (compile using "gcj --main=hello hello.java -o hello" on any system, Windows or Linux, which has the Java compiler installed):
public class hello
{
public static void main (String [] args) throws java.io.IOException
{
System.out.print("Hello, Java world!\n");
}
}
[NOTE: Edited on 9/12/2014 after some recent silly change by Researchgate messed up the formatting of most past posts that contained code snippets. It also ate angle brackets and paragraph breaks, making my post quite unintelligible.]
First of all, as V Toth stated Oracle is not a programming language. If you are interested in computer programming as non expert I think you need a basic level of mathematics and then try to learn programming with a popular language like Python, following structured programming rules. For the moment try not to make Python programs using Object Oriented paradigma, that is for the future.
When writing a program we should know about syntax and terminology related to any of the programming language. So we can get good output which we are wanted.
Suja, all of the answers given so far are quite good to consider. My perspective is different though. Before one jumps into the middle of writing code in a specific language, you must be sure of your solution. Your solution, would be what is referred to as an algorithm. If you can write your algorithm down on paper so that you understand *all* the steps necessary to get to the answer, then you can use almost any programming language to implement the solution.
When I've taught, I've always stressed getting the algorithm right, rather than composing at keyboard. Think it through, check it manually, then your chances of success are much higher once you actually implement in a programming language.