First of all Case 1->
When defining only TYPE A and TYPE B and commenting TYPE C then-> Immediately you get Compile time error saying that Func1 is duplicate method.
Since function overloading means that there is only change in the list/order of arguments . Whether you change access modifier or return type, it does not matter . What matter in Overloading is only change in number/order of arguments.
Now see in Case 1-> You have 2 functions
and
. See here both the functions have same number/order of arguments , there is no change that's why it does not compile.
Examples of Overloaded functions->
1-> public void Func1(){}
2->private int Func1(int a){}
3->protected double Func1(
String s){}
4->float Func1(int a,String s){} //See order changes here
5->float Func1(String s,int a){} //See order changes here
See above there is change in number/order of arguments that's why they are overloaded.
Now when you uncomment TYPE C then it does not give Compile time error since the whole function changes , now it is not overloading because the name of function changes from Func1 to Func2.
Not-> Functions are said to be overloaded when there is only change in number/order of arguments and name of function should be same. Change in return type or access modifier dosen't have any impact on Function Overloading.