Sponsored Content
Top Forums Programming Not getting O/P in expected way-java Post 303018138 by scriptor on Wednesday 30th of May 2018 03:57:10 AM
Old 05-30-2018
HI Rudic,

below is the code
Code:
 
 import java.io.*;
class A1
{
public static void main (String agrs[])
{
byte[] b = {'a','e','i','o','u'};
String s = "King Maker";
try
{
FileOutputStream f = new FileOutputStream("/home/tes1");
FileInputStream fis = new FileInputStream("/home/tes1");
byte p[]=s.getBytes();
f.write(65);
f.write(b);
f.write(p);
f.close();
int v ;
while(( v = fis.read())!=-1)
{
System.out.println((char)v);
}
fis.close();
System.out.println("happy");
}
catch(Exception e)
{
System.out.println(e);
}
}
}

 

We Also Found This Discussion For You

1. Programming

Java not getting in expected way

Hi i am new to java and written a below code on linux platform which is working fine but not getting the output on terminal as expected vi A.java import java.io.FileOutputStream; class A { public static void main (String args) { byte c= {'a','e','i','o','u'}; try {... (1 Reply)
Discussion started by: scriptor
1 Replies
request_scroll(3alleg4) 					  Allegro manual					   request_scroll(3alleg4)

NAME
request_scroll - Queues a hardware scroll request with triple buffering. Allegro game programming library. SYNOPSIS
#include <allegro.h> int request_scroll(int x, int y); DESCRIPTION
This function is used for triple buffering. It requests a hardware scroll to the specified position, but returns immediately rather than waiting for a retrace. The scroll will then take place during the next vertical retrace, but you can carry on running other code in the meantime and use the poll_scroll() routine to detect when the flip has actually taken place. Triple buffering is only possible with certain drivers: you can look at the GFX_CAN_TRIPLE_BUFFER bit in the gfx_capabilities flag to see if it will work with the current driver. RETURN VALUE
This function returns zero on success, non-zero otherwise. SEE ALSO
poll_scroll(3alleg4), request_video_bitmap(3alleg4), gfx_capabilities(3alleg4), scroll_screen(3alleg4) Allegro version 4.4.2 request_scroll(3alleg4)
All times are GMT -4. The time now is 12:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy