Join Regular Classroom : Visit ClassroomTech

Epam Full Question Paper Solved | Set – A | Part-II | codewindow.in

void function(struct node* head){
	if(head == NULL)
		return;
	function(head->next);
	printf("%d ", head->data);
}
String n_squares(int n){
	StringBuffer s = new StringBuffer("0");
	int n_squared = n*n;
	for (int i=0; i<n_squared; i++){
		s.append(", "+i);
	}
	return s.toString();
}
void function(struct Node *head)
{
	if (head==NULL)
		return;
	struct Node *p1 = head;
	struct Node *node = head->next;
	while(p1 != NULL && node != NULL)
	{
		p1->next = node->next;
		free(node);
		p1 = p1->next;
		if(p1 != NULL)
			node = p1->next;
	}
}
public class Wow {
	public static void go(short n) {System.out.println("short");}
	public static void go(Short n) {System.out.println("SHORT");}
	public static void go(Long n) {System.out.println("LONG");}
	public static void main(String [] args){
		Short y = 6;
		int z = 7;
		go(y);
		go(z);
	}
}
public class Plant {
	private String name;
	public Plant(String name) {this.name = name;}
	public String getname(){return name;}
}
public class Tree extends Plant {
	public void growFruit() { }
	public void dropLeaves() { }
}
import java.util.List;
import java.util.stream.Stream;
import static java.util.stream.Collectors.toList;

public class test
{
	public static List<Integer> generate(int series){
	    return Stream.iterate(new int[]{0,1}, s->new int[]{s[1],s[0]+s[1]})
		.limit(series)
		.map(n -> n[0])
		.collect(toList());
    }
    public static void main(String [] args) {
	    System.out.println(test.generate(5));
	}
}
public interface FooInterface{
	default public void defaultMethod(){
	    System.out.println("FooInterface");
	}
}
public interface BarInterface{
	default public void defaultMethod(){
	    System.out.println("BarInterface");
	}
}
public class FooBarChild implements FooInterface, BarInterface {
	public static void main(String[] args){
	    FooInterface foo = new FooBarChild();
	    foo.defaultMethod();
	}
	public void defaultMethod(){
	    System.out.println("Child's Own");
	}
}
public class testmeth
{
	static int i = 1;
	public static void main(String args[]){
		System.out.println(i+",");
		m(i);
		System.out.println(i);
	}
	public void m(int i){
		i += 2;
	}
}
public class Tester {
	static void call(Long x, Long y){
		System.out.print("Long x, Long y");
	}
	static void call (int... x){
		System.out.print("int... x");
	}
	static void call(Number x, Number y){
		System.out.print("Number x, Number y");
	}
	public static void main(String[] args){
		int val = 3;
		call(val, val);
	}
}
import java.util.*;
import java.lang.*;
import java.io.*;

public class d
	{
public static void main(String []args) throws java.lang.Exception
{
	int i1 = 2;
	int i2 = 5;
	double d;
	d = 3 + i1/i2 +2;
	System.out.println(d);
	}
}
abstract class AirPlane{
	abstract void fly();
	void land(){ // line 5
		System.out.print("Landing..");
	}
}
class AirJet extends AirPlane{
	AirJet() {
		super(); // line 14
	}
	void fly() {
		System.out.print("Flying..");
	}
}
String[] arr = new String[5];
int[] arr1 = new int[5];

Scanner kb = new Scanner (System.in);
for(int i = 0; i<5; i++)
{
    System.out.println("Enter text: ");
    arr[i] = kb.nextLine();
    System.out.println("Enter number: ");
    arr1[i] = kb.nextInt();
}

Also Checkout

Recent Posts
Categories
Pages