Java Programming (Arrays)








Single array

A single array variable can reference a large collection of data.

You will have to store a large number of data / values during the execution of a program. Suppose that you need to store 200 numbers to compute their average, sum or find maximum value. So first your computer will read the numbers and should store in variables. Think you have to declare 200 values and repeatedly write almost identical code 200 times huh is it easy? No you will fed-up soon. So how do you solve this problem? Most high level language are provide data structure, the Array, which can store a fixed size collection of elements of the same type.

 

Arraya collection of data or one can think array is a collection of data in same type. Correct.

How to Declare a Array variable?

elementType[] arrayRefVar;
 
The elementType can be any data type, and all elements in the array will have the same data type. For example, the following code declares a variable myList that references an array of double elements.

int[] myList;

  
Creating Arrays



Unlike declarations for primitive data type variables, the declaration of an array variable does not allocate any space in memory for the array. It creates only a storage location for the reference to an array. If a variable does not contain a reference to an array, the value of the variable is null. You cannot assign elements to an array unless it has already been created. After an array variable is declared, you can create an array by using the new operator and assign its reference to the variable with the following syntax:

arrayRefVar = new elementType[length];   

 

elementType[] arrayRefVar = new elementType[arraySize];

or,

elementType arrayRefVar[] = new elementType[arraySize];

Examples of such a statements

char[] myList= new char [10];

To assign values to the element, use the syntax:

arrayRefVar[index] = value;

 

For example, the following code initializes the array.

myList[0] = 34;

myList[1] = 89;

myList[2] = 45;

myList[3] = 23;

myList[4] = 67;

 

This array can illustrate like this

int[] myList= new int[5]

 

myList[0]
34
myList[1]
89
myList[2]
45
myList[3]
23
myList[4]
67

 

Array Initializers Java has a shorthand notation, known as the array initializer, which combines the declaration, creation, and initialization of an array in one statement using the following syntax:

elementType[] arrayRefVar = {value0, value1, ..., valuek};

For example, the statement

double[] myList = {1.9, 2.9, 3.4, 3.5};

declares, creates, and initializes the array myList with four elements, which is equivalent to the following statements:

double[] myList = new double[4];

myList[0] = 1.9;

myList[1] = 2.9;

myList[2] = 3.4;

myList[3] = 3.5;

In my next post I hope to explain how to process arrays for some purposes.

Thank you guys

 

 

 

 

 

 

 

Speed up your windows installation

How to speed up your Windows installation

Please read this article completely before you proceed windows installation. This can be done for any windows installation such as “windows Vista,Windows 7,Windows 8” 

 1.First boot from your windows disk. 

 2.When You get the screen to install Windows proceed to next.


3.When installation begins you can see following on your screen.


 4.Press “Shift+F10” before windows start to “Expand Windows Files”


5.Then command prompt is on your screen.


 6.Now type “taskmgr” without quotes and press enter.


 7.Now task manager is on your screen. Here in “Application” tab there is a task named “install windows”.Then right click on it and click on “Go To Process”.


 8.Then there you can see 2 processes named “setup.exe”.Right click on one “setup.exe” and move your mouse pointer to “Set priority” and now priority is in “normal” mode. 


 9.Now Change it to “High” but do not change it to “Realtime”.


 10.Then click on “Change priority” on the pop-up message.








11.Now repeat 8 to 10 steps for the other process named “setup.exe”.


12. Now it is done.
13.Close “task manager”

14.Type “exit” and press enter to exit from Command Prompt (CMD).











15.Continue your windows installation and it will completed within a short time other than in normal installation.










































Thanks.

Windows 10's new browser, is now available for testing

Build 10049 released today, has the full Spartan browser. That means it offers not just the rendering engine, which was technically accessible before if you knew the right trick, but also the interface with its hotly anticipated features.
These include Cortana integration, the ability to markup web pages, and a reading mode that simplifies pages so that distracting page elements are no longer an issue. In addition to this trio, Microsoft has added a feedback feature into both Spartan and Internet Explorer. An emoji icon in the interface of both lets users quickly “send frowns” that provide feedback about the company’s progress and any issues impacting the browsing experience.


Interface Updated

Blog interface had been updated for better reading experience

Special Announcement to all followers


Hi follower,

We have changed our blog, since now this will be maintain by new editors and blog will be basically about Information Technology related things.  
thank you,
blog team  

//{I_Code_JAVA}

Getting started with JAVA programming 

 Are you new to java? If yes here is the way to become a java expert.
How to install JAVA Development Kit on your computer 

 Step 1 

      Download java development kit from oracle. 

       Click here to download. (Use the images to get an idea)


Click on accept

Select your download type 64 bit or 32 bit 
and wait until downlaod complete.
Step 2
            After download complete run the setup.
Step 3
            Do not change install location and set it to be default
Step 4
            Wait until installation to be complete.
Step 5
           Now you have JAVA installed in your computer.

Step 6
           Then you need to set path to compile a java program. Here is the way.

Go to your java installed location. In my case it may be c:\program files\java\jdk1.7.0\ (may vary due to java version)

create a new folder named “My docs”.



Open that folder.
Now you are inside the folder named “My docs”
Now open notepad and type start and save it as “cmd.bat” in “My docs” folder.



Now go to c:\program files\java\jdk1.7.0\ bin (your may be vary)


Now copy the path in your address bar

if you are a window 8 user follow these steps;

  1. Drag the Mouse pointer to the Right bottom corner of the screen
  2. Click on the Search icon and type: Control Panel
  3. Click on -> Control Panel -> System -> Advanced System Settings
  4. Click on Environment Variables, under System Variables, find PATH, and double click on it.
  5. Now click on variable value field, put a ; at end of the value.

  6. Now paste copied path after the semi colon
  7. click on ok then again ok and ok.

Now go to c:\program files\java\jdk1.7.0\My docs
Now open CMD.bat file
Then type “javac” and press enter
If you get text like in the image below you are successful.


Now it is time to code java.

How to start java coding

Now you can start to code java. Here is an example
Open notepad .Type these text
class a1{

         public static void main(String args[]){

                     System.out.println("Hello JAVA");

        }

}
Now save this as "a1.java" in "My docs" folder.
Now open "CMD.bat" and type javac a1.java and press enter
Then if it was successful type java a1 and press enter.
Now in cmd you can see a text "hello JAVA".
Now do not close cmd keep it minimized and code some more java program.then save it.
Now again type javac and then type name of your saved java program with .java extension .
Then type java and  saved java program and press enter.



What are the differences between C and C++

 C is an imperative (procedural), structured paradigm language whereas C++ is multi-paradigm: procedural, functional, object-oriented and generic. Both are high-level, abstract languages. While C's design provides constructs that map efficiently to machine code instructions, C++ is more abstract, relying heavily upon object-oriented principals. However, both are equally capable of producing highly-efficient machine code programs. C++ derives almost directly from C thus everything you can do in C you can do in C++ with relatively minor alterations to the source. C++ was originally called C with Classes and that pretty much sums up the main difference between the two languages. However, there are many subtle differences.

One key difference between C and C++ is in the struct data type. In C, a struct can only contain public data members (with no methods). In C++, a struct is similar to a class, combining data and the methods that operate upon that data into a single entity (an object). The only difference between a C++ struct and a C++ class is that class members are private by default whereas struct members are public by default.

Another key difference is that because C++ is object oriented, there is much less reliance upon the programmer to manage memory. Each object takes care of its own memory allocations (including embedded objects), thus the programmer simply creates and destroys objects as needed. Thus C++ is much easier to work with, especially with regards to highly-complex hierarchical structures, but is every bit as efficient as C.

Both languages are highly popular and there are few architectures that do not implement suitable compilers for both. Thus they are both highly portable. However, the object oriented approach to programming gives C++ a major advantage over C in terms of code re-usability, scalability and robustness.

Difference Between MIS and DSS

MIS and DSS are two abbreviations that are often heard in the field of Business Management. They differ in a few aspects. It is important to know that MIS stands for Management Information Systems whereas DSS stands for Decision Support Systems.
It is interesting to note that MIS is a type of link that assists in the communication between managers of various disciplines in a business firm or an organization. On the whole it plays a very important role in building up communication among the corporate people.
DSS on the other hand is an improvement of the concept of MIS. It is true that both of them differ in terms of their focus. DSS focuses more on leadership. It is all about senior management in a firm providing innovative vision.
On the other hand MIS focuses more on the information gathered and the information that has poured from different quarters. Experts on managerial behavior say that DSS focuses more on decision making. MIS on the other hand focuses more on planning the report of various topics concerned with the organization that would assist the managers to take vital decisions pertaining to the functioning of the organization.
One of the finest differences between MIS and DSS is that MIS focuses on operational efficiency whereas DSS focuses more on making effective decision or in other words helping the company to do the right thing. Flow of information is from both sides, up and down in the case of MIS. On the other flow of information is only upward in the case of DSS.
In the case of DSS the report can be flexible whereas in the case of MIS the report is usually not flexible. MIS is characterized by an input of large volume of data, an output of summary reports and process characterized by a simple model. On the other hand DSS is featured by an input of low volume of data, an output of decision analysis and a process characterized by interactive model.
Experts would also say that MIS is a primary level of decision making whereas DSS is the ultimate and the main part of the decision. This is one of the most talked about different between the two.
As a matter of fact MIS is all about theory whereas DSS is all about practice and analysis. An organization should employ both the systems effectively.

Difference Between TPS and MIS


Information systems have become vital for organizations today and in some industries, even survival is difficult without extensive use of information technology. To become more efficient and competitive, companies are making use of these information systems such as MIS and TPS. Though there is considerable overlapping between the two, there are a lot of differences between TPS and MIS that will be discussed in this article.
MIS
MIS, which stands for Management Information System, helps middle level management in monitoring, controlling, decision making and administrative activities. MIS provides managers with current performance of the organization. Managers make use of this information to monitor and control business and also to devise strategies to better the performance in future.
The data which is available through MIS is summarized and presented in concise reports on a regular basis. MIS serves the interests of managers on weekly, monthly and yearly results though some MIS can produce results on a daily basis to be used by managers. A manager can get answers to predefined set of questions through MIS regularly. MIS is not very flexible and also does not have analytical capability. A vast majority of MIS systems make use of simple routines and stay away from complex mathematical models.
TPS
Another type of information system that has become very popular is TPS. It stands for Transaction Processing System and collects, stores, modifies and retrieves all information about transactions in an organization. A transaction here is referred to any event that generates or modifies the already stored information.
If an organization is using both MIS and TPS, there is regular exchange of data among these systems. TPS becomes a major source of data for MIS. The data that is generated through TPS is on the level of operations such as payroll or order processing. TPS tracks daily routine transactions that are essential to conduct business. MIS makes heavy use of data from TPS though it also utilizes data from other sources.

In brief:
• Information systems have become very necessary for systems to remain competitive and more productive today
• MIS stands for Management Information System and helps in controlling, monitoring and decision making at the middle level management.
• TPS generates data at the operational level and makes available information that is used heavily my MIS.