public class First_C {public void myMethod(){System.out.println("Method");}{System.out.println(" Instance Block");}public void First_C(){System.out.println("Constructor ");}static {System.out.println("static block");}public static void main(String[] args) {First_C c = new First_C();c.First_C();c.myMethod();}}
main(){Float a = 5;switch(a){Case 5: cout "sookshmas";Default: cout "Scaler";}}
class OutputWhat will be the output of the following Java code?{public static void main(String args[]){Integer i = new Integer(35);byte x = i.byteValue();System.out.print(x);}}
#include iostreamusing namespace std;int main() {int n;cin n;for(int col=row; col=1; col=col-1) {int ans = col;char ch = ans + 'A' -1;cout ch;}cout endl;}
public class College{int fee=30000;public College (int fee){System.out.println("local variable fee "+fee);System.out.println("instance variable fee"+this.fee);}public static void main(String[] args){College c=new College (20000);}}
What will be the output of the following code snippet?#include stdio.hvoid solve() {int ch = 2;switch(ch) {case 1: printf("1 ");case 2: printf("2 ");case 3: printf("3 ");default: printf("None");}}int main() {solve();return 0;}
#include iostreamENTER INPUT: 8using namespace std;int main() {int n;cin n;for(int row=0; rown; row=row+1) {int col;for( col=0; colrow+1; col=col+1) {int ans = col + 1;char ch = ans + 'A' -1;cout ch;}}}