Programming Thread

Viewing single post

Started by the-pi-guy, Mar 13, 2016, 10:39 PM

previous topic - next topic

the-pi-guy

One of my slides for class:

Scoping Issues

Same name can be declared multiple times if the declarations occur in different scopes.  


This is a valid Java program:
public class Test{
     int Test;
     public void Test(){
         double Test;
    }
}

This is allowed in C++:
int Test(){

double Test;

  {
  bool Test;
  }

}